Search Results

Search found 6 results on 1 pages for 'l314ck c0d3r'.

Page 1/1 | 1 

  • AttributeError HELP!

    - by C0d3r
    class Account: def __init__(self, initial): self.balance = initial def deposit(self, amt): self.balance = self.balance + amt def withdraw(self,amt): self.balance = self.balance - amt def getbalance(self): return self.balance a = Account(1000.00) a.deposit(550.23) a.deposit(100) a.withdraw(50) print a.getbalance() I get this error when I run this code.. AttributeError: Account instance has no attribute 'deposit'

    Read the article

  • IOS4 UISplitViewController in Portrait Orientation with RootViewController showing like Landscape

    - by magic-c0d3r
    In IOS 3.2 I was able to display my UISplitViewController side by side like in landscape mode. In IOS 4.2 the RootViewController (MasterView) is not showing up in portrait mode. Does anyone know if we need to display the rootviewcontroll in a popover? Can we display it side by side like how it is in landscape mode? I want to avoid having to click on a button to show the masterview (when in portrait mode)

    Read the article

  • socket.error: [Errno 10054]

    - by C0d3r
    import socket, sys if len(sys.argv) !=3 : print "Usage: ./supabot.py <host> <port>" sys.exit(1) irc = sys.argv[1] port = int(sys.argv[2]) sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.connect((irc, port)) sck.send('NICK supaBOT\r\n') sck.send('USER supaBOT supaBOT supaBOT :supaBOT Script\r\n') sck.send('JOIN #darkunderground' + '\r\n') data = '' while True: data = sck.recv(1024) if data.find('PING') != -1: sck.send('PONG ' + data.split() [1] + '\r\n') print data elif data.find('!info') != -1: sck.send('PRIVMSG #darkunderground supaBOT v1.0 by sourD' + '\r\n') print sck.recv(1024) when I run this code I get this error.. socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host it says that the error is in line 16, in data = sck.recv(1024)

    Read the article

  • UILabel to render partial character using clip

    - by magic-c0d3r
    I want a UILabel to render a partial character by setting the lineBreakMode to clip. But it is clipping the entire character. Is there a different way to clip a word so that only partial character is displayed? Lets say I have a string like: "Hello Word" and that string is in a myLabel with a width that only fits the 5 characters and part of the "W" I want it still to render part of the "W" and not drop it from the render.

    Read the article

1