Saturday, May 30, 2009

What is Plurk?

Quick Definition:
A Micro-Blogging Site.. A Social Media Site.. Network.. It's a site.

Further Definition:
PLURK is a Micro-Blogging site that has recently grown in popularity with such quotes as 'It is the next TWITTER', 'It is better that TWITTER with less technical problems', 'This is the type of site that will change the internet!'.

PLURK has introduced a timeline into Micro-Blogging that in turn introduces a more instant messaging feel to Social Networking. Where TWITTER is great for letting friends and followers know what you are up to, PLURK gets more attention and interaction from your friends and watchers.
PLURK is NOT without its problems though! In fact, this very stint of PLURKING

________________________________________
SOME QUICK TIPS TO GET YOU ON YOUR PLURKING WAY
________________________________________
LINKING:
http://domain.extention/directory (text for link)
LINKING User Names:
Use the @ symbol [ @username ] to link that users profile
LINKING Images / Videos:
Flickr Example:
http://flickr.com/photos/euart/5282104427/
youTube Example:
http://www.youtube.com/watch?v=pv5zWaTE5VkI
Personal WWW Example:
http://www.website.com/pictures/buttons.jpg
ITALIC Text:
Use the asterisk like this : *word to be italic*
BOLD Text:
Use double asterisks like this : **word to be bold**
UNDERLINING Text:
Use double underscores like this : __word tobe underlined__

[ reviewshowtos.com ]
[ zenelements.co.uk ]

Friday, May 29, 2009

Text Flipper Script

<script language="JavaScript">
function flip() {
var result = flipString(document.f.original.value.toLowerCase());
document.f.flipped.value = result;
}

function flipString(aString) {
var last = aString.length - 1;
//Thanks to Brook Monroe for the
//suggestion to use Array.join
var result = new Array(aString.length)
for (var i = last; i >= 0; --i) {
var c = aString.charAt(i)
var r = flipTable[c]
result[last - i] = r != undefined ? r : c
}
return result.join('')
}

var flipTable = {
a : '\u0250',
b : 'q',
c : '\u0254', //open o -- from pne
d : 'p',
e : '\u01DD',
f : '\u025F', //from pne
g : '\u0183',
h : '\u0265',
i : '\u0131', //from pne
j : '\u027E',
k : '\u029E',
//l : '\u0283',
m : '\u026F',
n : 'u',
r : '\u0279',
t : '\u0287',
v : '\u028C',
w : '\u028D',
y : '\u028E',
'.' : '\u02D9',
'[' : ']',
'(' : ')',
'{' : '}',
'?' : '\u00BF', //from pne
'!' : '\u00A1',
"\'" : ',',
'<' : '>',
'_' : '\u203E',
';' : '\u061B',
'\u203F' : '\u2040',
'\u2045' : '\u2046',
'\u2234' : '\u2235',
'\r' : '\n' //thank you, Yeeliberto
}

for (i in flipTable) {
flipTable[flipTable[i]] = i
}
</script>

<html>
<body>
<h2>Text Flipper</h2>
<form name="f">
Original: <textarea rows="5" cols="50" name="original" onKeyUp="flip()"></textarea>
<br>
Flipped: <textarea rows="5" cols="50" name="flipped"></textarea>
</form>
</body>
</html>

Friday, May 8, 2009

Basic AJAX Script

<script language = "javascript">

var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
}

else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}

function getData(dataSource, divID) {
if(XMLHttpRequestObject) {
var obj = document.getElementById(divID);
XMLHttpRequestObject.open("GET", dataSource);
XMLHttpRequestObject.onreadystatechange = function() {
if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
obj.innerHTML = XMLHttpRequestObject.responseText;
}
}
XMLHttpRequestObject.send(null);
}
}
</script>

At the HTML just add this line :
onClick="getData('my_write.php?type=kingston','contentalt')"

  • onClick is an event handler
  • my_write.php is a processing page
  • type=kingston is a parameter passed to my_write.php, named "type" and valued "kingston"
  • contentalt is div id where the result from my_write.php will appears

HTML Escaper Script

<script type="text/javascript">
/*
Simple HTML escaper by Raymond May Jr.
Uses global regex to replace < and > with HTML entities.
http://www.compender.com
*/

function escape()
{
var input = document.getElementById("input").value;

input = input.replace(/&/g,"&amp;");

input = input.replace(/</g,"&lt;");
input = input.replace(/>/g,"&gt;");

document.getElementById("input").value = input;
}

function unEscape()
{
var input = document.getElementById("input").value;

input = input.replace(/&lt;/g,"<");
input = input.replace(/&gt;/g,">");

input = input.replace(/&amp;/g,"&");

document.getElementById("input").value = input;
}
</script>

<html>
<body>
<h2>HTML Escaper</h2>
<form>
<textarea id="input" rows="30" cols="80"></textarea>
<br />
<input type="button" value="Escape!" onClick="escape()" />
<input type="button" value="Un-Escape!" onClick="unEscape()" />
</form>
</body>
</html>

How to Post HTML Code on Your Blog

Ever wanted to post some HTML code in a Blogger post only to find that Blogger does not have code tags? The quick solution is to replace all "<" and ">" characters with their HTML entity equivalents "& lt;" and "& gt;".

Or you can use a simple JavaScript client side HTML escaper. Just paste your HTML code in the textarea and click "Escape!"

Wednesday, May 6, 2009

Apache Error - localhost not working

Well, I've installed Apache 2 on my WinXP system. I currently use Windows Firewall & have checked to make sure it is not blocking Apache. I've tried both AppServ and XAMPP, and I got same error.

I can't find my localhost in the web browser & I've found the size of error log is 200MB with following message in the error log:

[Tue Oct 26 19:33:30 2008] [notice] Parent: Created child process 2384
[Tue Oct 26 19:33:31 2008] [notice] Child 2384: Child process is running
[Tue Oct 26 19:33:31 2008] [notice] Child 2384: Acquired the start mutex.
[Tue Oct 26 19:33:31 2008] [notice] Child 2384: Starting 250 worker threads.
[Tue Oct 26 19:33:31 2008] [error] (OS 10038)An operation was attempted on something that is not a socket. : Child 2384: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive.

This problem can be solved easily, follow this step :
1. On the top of httpd.conf
2. Write this on a separate line : Win32DisableAcceptEx
3. Save the file
4. Restart the apache service
5. Finish