03/03/2003: How Do I Store Text in the Windows Clipboard Using JavaScript?
How Do I Store Text in the Windows Clipboard Using JavaScript?
Click on the first line of text in order to see that text pasted into the third line of text:
<HEAD> <SCRIPT> function IsWhitespace(ch) { return( ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t' || ch == '\f' || ch == '\v' || ch == '\b' ); } // SaveToClibboard function S2CB() { maxLen = 80; numLines = event.srcElement.innerText.length / maxLen; newStr = ''; startPos = 0; for (x = 0; x < numLines; x++) { endPos = startPos + maxLen; while (! IsWhitespace(event.srcElement.innerText.charAt(endPos))) endPos--; newStr = newStr + event.srcElement.innerText.substring(startPos, endPos) + '\n'; startPos = endPos + 1; } newStr = newStr + event.srcElement.innerText.substring( startPos, event.srcElement.innerText.length ) + '\n'; window.clipboardData.setData('Text', newStr); oSource2.innerText = window.clipboardData.getData('Text'); } </SCRIPT> </HEAD> <BODY> <B ID="oSource" onClick="S2CB()">@changes 2000-Nov-01 DMM DMM00013 Silentsurf(nph-index.cgi,Interface.pm): Initial hits to the server are immediately routed to the startup form which eliminates a lot of module loading in the Silentsurf package./</B><br> <B ID="oSource1" onClick="S2CB()">222</B><br> <pre>!!<B ID="oSource2" onClick="S2CB()">333</B>!!</pre><br> </BODY> </HTML>
03/03/2003: How do I Reset the Root password of MySQL Using Linux?
How do I Reset the Root password of MySQL Using Linux?
- /usr/local/mysql/bin/safe_mysqld --skip-grant-tables &
- /usr/local/mysql
- use mysql;
- update user set password = password('.......') where user = 'root' and host='localhost';
- Stop and Start the MySQL server. [2003Oct03 Note] A reader mentioned that it is easier to 'flush privileges' instead of restarting the server.