Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/nmp/public_html/support/functions.php on line 4
NoMorePasting.com
Pastes:104842  Views:2213259 

Languages:

   ASP
   C#
   C++
   HTML
   Java
   PHP
   VB.NET
   Visual Basic 6

more languages available...


Looking to freelance?

( bids)

( bids)

( bids)

( bids)

( bids)

Hire Freelancers & Find Freelance Jobs Online - Freelancer

Hire freelancers for a fraction of the cost!

  • Post your project within seconds

  • Compare prices & select bidders

  • Pay only once satisfied

Looking for work?

Become a freelancer and earn money!

  • Browse jobs matching your skills

  • Apply for work

  • Get hired and earn money

or
Sign up with your email address Looking to hire?

Need work done?

Post your project and receive competitive bids from freelancers within minutes. Our reputation system will make it easy to find the perfect freelancer for your job. It's the simplest and safest way to get work done online!

How do you benefit?

  • You'll receive competitive bids from our talented freelancers within minutes
  • Keeping up-to-date is easy with our realtime chat, 24/7 support, time tracker, and mobile apps
  • Pay for work safely and securely. Only release payment when you are 100% satisfied with the work provided!

Try Freelancer Local

  • Post a job

  • Pick the best

  • Get offers

 

 

 

 

 

 


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2062
Here's the requested code from the pastebin:

Wrap Lines   Use Line Numbers
#
# Written by astigmatik
# This is for Jython2.2 RC2 and to show a possible bug when
#  sending to a socket that has been closed/disconnected.
#
 
import socket, threading
 
class SimpleServer(threading.Thread):
 
  def __init__(self):
     print "Server opened"
 
  def run(self):
     serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     serversocket.bind(('localhost', 6667))
     serversocket.listen(1)
     print "Server listening"
     while 1:
        (clientsocket, address) = serversocket.accept()
        print "Server has accepted client"
        break
     clientsocket.close()
     serversocket.close()
     print "Server has closed all sockets"
 
class SimpleClient:
 
  def __init__(self):
     print "Client opened"
 
  def connect(self):
     print "Client connecting"
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     s.connect(('localhost', 6667))
     self.sockname = s
     print 'Client will send data to socket after 5 seconds'
     t = threading.Timer(5, self.sockwrite)
     t.start()
 
  def sockwrite(self):
     print 'Client trying to send data'
     self.sendtry(self.sockname, 1)
     self.sendtry(self.sockname, 2)
     print "Done"
 
  def sendtry(self, s, n):
     print "Client attempting to send data. Try no. %s" % n
     try:
        s.send('Hello')
     except socket.error:
        print "Socket error at try no. %s" % n
        s.close()
        print "Client closed from try no. %s" % n
 
def openclient():
  c = SimpleClient()
  c.connect()
 
def main():
  t = threading.Timer(10, openclient)
  t.start()
  server = SimpleServer()
  server.run()
 
if __name__ == '__main__':
  main()
Syntax Highlighting:  



Copyright 2007 - NoMorePasting.com