User Profile

Collapse

Profile Sidebar

Collapse
diwakar09
diwakar09
Last Activity: Oct 9 '09, 11:22 AM
Joined: Sep 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • diwakar09
    started a topic Help me in the following code

    Help me in the following code

    Code:
        def startConnection(self):
            from ftplib import FTP
            self.ftp = FTP(self.loginServer)
            print 'Loging In'
            print self.ftp.login(self.username, self.password)
            data = []
            self.ftp.dir(data.append)
            #self.ftp.sendcmd('LIST')
            for line in data:
                try:
                    self.date_str = ' '.join(line.split()[5:8])
    ...
    See more | Go to post
    Last edited by bvdet; Oct 9 '09, 12:58 PM. Reason: Add code tags

  • diwakar09
    replied to How to delete a directory on restart
    in C
    Thanks for your reply.
    I was also thinking the same, But i thought there must be some other way,
    Any ways, once again thanks for your reply....
    See more | Go to post

    Leave a comment:


  • diwakar09
    started a topic How to delete a directory on restart
    in C

    How to delete a directory on restart

    Hi,

    Is there any in c/c++ through which i can mark some directory or files for deletion, But this deletion should happen only on next restart of system.
    I have to implement it in a application that will run on linux and mac.

    Thanks in advance.
    See more | Go to post

  • diwakar09
    started a topic Which can be the best book
    in Perl

    Which can be the best book

    Hi,

    I am very new to perl, actually i even don't know the "abc" of perl,
    Could some one suggest which book should i follow or some usefull links.
    See more | Go to post

  • diwakar09
    started a topic how to set path from dos

    how to set path from dos

    how to set path from dos command

    i know set path=c:\somethi ng

    but it is for the current session.when you open a knew command prompt and type path it shows only the previous path.

    how to set path permanently.
    See more | Go to post

  • diwakar09
    started a topic how to write plug-ins for safari
    in C

    how to write plug-ins for safari

    hi all,
    could you tell me how to write plugins for mac safari
    how to start, i have the dll's but i don't know how to start,
    pls. guide me,
    if possible send me some links from where i can access the information
    thanx
    See more | Go to post

  • diwakar09
    replied to The best software to run C++ programs
    in C
    There is no one who is best,
    In my opinion you can use visual studio, I am using it in my xp
    In it works fine but i don't know about vista,
    you can try it, and also let me know
    See more | Go to post

    Leave a comment:


  • diwakar09
    replied to how to create xml
    Hi
    i have got the thing, so no need to try it guys
    here is the whole code
    Code:
    from xml.dom.minidom import Document
    import simplejson
    doc = Document()
    class xmlhelper:
        astring = None
        jsonBuffer = None
        def __init__(self,sstr):
            self.astring = sstr
        def createjson(self):
            self.jsonBuffer =  simplejson.loads(self.astring)
    ...
    See more | Go to post

    Leave a comment:


  • diwakar09
    started a topic how to create xml

    how to create xml

    Hi,

    I have a json that i have parsed with simplejson, Now i have to make a xml by using this json
    Code:
    a = simplejson.loads('{"result":"true","name":{"first":"abcd","middle":"efgh"}}')
     a
    {u'result': u'true', u'name': {u'middle': u'efgh', u'first': u'abcd'}}
    now i have to create a xml by using these data like...
    See more | Go to post

  • diwakar09
    replied to how to get the size of an object
    Thanx for your reply
    but still i didn't get things
    Code:
    import string
    class test2:
        ival = None
        sstr = None
        def __init__(self,i,j):
            self.ival = i
            self.sstr = j
    def start():
        
        obj = test2(10,"the test2")
        print len(obj)
    it says
    Traceback (most recent call last):
    File "<stdin>",...
    See more | Go to post

    Leave a comment:


  • diwakar09
    started a topic how to get the size of an object

    how to get the size of an object

    Hi,

    Code:
    class myclass:
         def __init__(self,i,j):
              ival = i
              sstrng = j
    this is a very simple class
    if i create object like
    obj = myclass(15,"for test")

    is there any operator like sizeof() in c, which tells about the size of the object
    if not how can i get the size of object.
    See more | Go to post

  • diwakar09
    replied to how to pass an object
    Code:
    import os
    import memcache
    import helper
    import time
    from dThread import dThread
    import cPickle as pickle
    CClientArray = []
    Objectke = []
    #j = 1
    def to_s(val):
        """
        Convert val to string.
        """
        if not isinstance(val, str):
            return "%s (%s)" % (val, type(val))
        return val
    ...
    See more | Go to post

    Leave a comment:


  • diwakar09
    started a topic how to pass an object

    how to pass an object

    hi,

    could you please help me in passing object to memcache set() function
    actuallly i want to pass my class object as a key to memcache set(key,value) function,
    i have tried str() function but i doesn't work
    if you can provide a sample code that will be good for me
    i am using python 2.5 on my ubuntu machine.
    See more | Go to post

  • diwakar09
    replied to getting exeception in writting the file
    in C
    Thanks for your reply.
    Now i have changed the whole senario, but couldn't remove that exception,
    May i sent you my files so that you can have a look. if yes give me your mail id,
    any way thanxs once again....
    See more | Go to post

    Leave a comment:


  • diwakar09
    replied to Replace a FOR loop into an infinite one
    in C
    yes you are right making for loop into infinite is not a big deal
    you can make it
    Code:
        int i = 0;
      for( i ; i < 6 ; i++)
    {
         ......
        if ( inputFile[i] == NULL )
           {   i = 0;
                continue;
            }
    }
    may be this is not the proper code but you have to do some thing like this.
    I hope you got it the idea.
    ...
    See more | Go to post

    Leave a comment:


  • diwakar09
    started a topic getting exeception in writting the file
    in C

    getting exeception in writting the file

    Hi,

    I have three classes, each one has distinct role apart from this there is main.
    from main the flows goes as follows
    main-->CTestForLog(cr eate and run the thread)
    and in thread flows goes as.
    CLogger-->CFileWriter(si ngleton class and it writes to a file )

    Means In thread funstion i have instance of CLogger class which calls the write method of CFileWriter class...
    See more | Go to post

  • diwakar09
    started a topic how to get filename from filename
    in C

    how to get filename from filename

    i am using vc++ Win32
    any suggestion
    pls help me
    See more | Go to post

  • diwakar09
    started a topic how to get handles of windows
    in C

    how to get handles of windows

    Hi

    how to get handles of windows which are presented in the task bar.
    so that i can use those windows with their respective handles. i am using vc++
    (Win 32)
    pls. help me out
    See more | Go to post

  • diwakar09
    started a topic how to create bitmap
    in C

    how to create bitmap

    how to create bitmap in vc++ (WIN32)of the content in the running window
    could you please tell me the steps
    and then i have to save this bitmap into the hard disk
    please help me.
    Thanx
    See more | Go to post

  • diwakar09
    replied to how to get hdc
    in C
    thanx a lot for helping me...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...