Bài đăng

Điều khiển flash player sử dụng javascript

&lt !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" &gt &lt html xmlns="http://www.w3.org/1999/xhtml" lang="en" &gt &lt head &gt &lt script type="text/javascript" src="swfobject.js" &gt &lt /script &gt &lt script type="text/javascript" &gt function sendEvent(swf,typ,prm) { thisMovie(swf).sendEvent(typ,prm); }; function getUpdate(typ,pr1,pr2,swf) { if(typ == 'state') fetch_obj('stateshow').innerHTML = pr1; }; function thisMovie(swf) { if(navigator.appName.indexOf("Microsoft") != -1) return window[swf]; else return document[swf]; }; function fetch_obj(idname){ if (document.getElementById){ if(document.getElementById(idname)==null) return window.parent.document.getElementById(idname); else return (document.getElementById(idname)); }else if (document.all){ if(document.a...

Cắt bỏ khoản trắng trong javascript

function checkForm(){ var rs = false; document.mainform.editor.value = editor.getHTML(); if(document.getElementById('servicename')!=null){ var str = document.getElementById('servicename').value; str = trim(str); if((str=="")||((str == null))){ alert('Please! input to service name!'); return false; } else document.getElementById('servicename').value = str; } } function trim(str) { if(!str || typeof str != 'string') return null; return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' '); } String.prototype.trim = function() { if(!this || typeof this != 'string') return null; return this.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' '); } _form id="mainform"> _textarea id="editor...

Kiểm tra là 1 xâu là chỉ gồm chữ hoặc số in JAVASCRIPT

function isAlphabetNumber($st){ if (ereg('^[a-z|A-Z|0-9]+$', $st)){ return 1; }else{ return 0; } }

way to check wether the session is started including ip logging

way to check wether the session is started including ip logging if( !isset( $_SESSION ) ) { session_start (); } if( isset( $_SESSION [ 'REMOTE_ADDR' ] ) && $_SESSION [ 'REMOTE_ADDR' ] != $_SERVER [ 'REMOTE_ADDR' ] ) { session_regenerate_id (); $_SESSION [ 'REMOTE_ADDR' ] = $_SERVER [ 'REMOTE_ADDR' ]; } if( !isset( $_SESSION [ 'REMOTE_ADDR' ] ) ) { $_SESSION [ 'REMOTE_ADDR' ] = $_SERVER [ 'REMOTE_ADDR' ]; }

ways of checking if a session is active

function session_started (){ if(isset( $_SESSION )){ return true ; }else{ return false ; } } //Start the output buffer so we dont create any errors with headers ob_start (); //Check to see if it has been started if( session_started ()){ echo 'The session has been started.' ; }else{ echo 'The session has not been started.' ; } //Start the session echo 'Starting Session...' ; session_start (); //Check again if( session_started ()){ echo 'The session has been started.' ; }else{ echo 'The session has not been started.' ; } //Flush the buffer to screen ob_end_flush ();

Embedding Windows Media Player

To embed an object in HTML document, the object class ID is required. The class ID for Windows Media Player 7, 9, 10 and 11 is clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6. Insert the following code into your HTML document to embed Windows Media Player 7 and later: &lt OBJECT id="VIDEO" width="320" height="240" style="position:absolute; left:0;top:0;" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> &lt PARAM NAME="URL" VALUE="your file or url"> &lt PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> &lt PARAM NAME="AutoStart" VALUE="True"> &lt PARAM name="uiMode" value="none"> &lt PARAM name="PlayCount" value="9999"> &lt /OBJECT> Most important parameters supported by Windows Media Player...

sample lab topologies for Vlan trunk

Hình ảnh
# Simple Ethernet Switch lab # cau hinh nay da duoc toi u tren may tinh cong ty autostart = False [localhost] ghostios = true sparsemem = true mmap = True workingdir = D:\Working\DYNAGEN\1R3745-2SW2691-4PC3620 [[3745]] image = C:\Program Files\Dynamips\images\c3745-adventerprisek9-mz.124-12.bin ram = 160 slot2 = NM-4T [[2691]] image = C:\Program Files\Dynamips\images\c2691-entbasek9-mz.124-12.bin ram = 128 slot1 = NM-16ESW [[3620]] image = C:\Program Files\Dynamips\images\c3620-io3-mz.122-32.bin ram = 32 slot1 = NM-1E [[ROUTER SW1]] model = 2691 f1/12 = SW2 f1/12 f1/1 = PC1 f0/0 # 192.168.1.1 f1/2 = PC2 f0/0 # 192.168.2.1 console = 2005 idlepc = 0x60691994 [[ROUTER SW2]] model = 2691 f1/1 = PC3 f0/0 # 192.168.1.2 f1/2 = PC4 f0/0 # 192.168.2.2 console = 2006 idlepc = 0xffffffff8000ad08 [[router R1]] model = 3745 console = 2007 f0/0 = SW1 f1/0 idlepc = 0xffffffff8000a8ac #idlepc = 0xffffffff8000b4d8 #idlepc = 0xffffffff8000b518 [[router PC1]] model ...