User Profile

Collapse

Profile Sidebar

Collapse
Arushi
Arushi
Last Activity: Jan 30 '23, 06:03 PM
Joined: Oct 27 '22
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Arushi
    replied to How to start code refactoring?
    The best way to start refactoring code is to use a process such as the "Red-Green-Refactor" cycle. This process basically involves making small changes, testing the code to make sure it still works as expected, and then making further improvements. This process helps ensure that the code is not harmed during refactoring.

    It is also important to do an analysis of the code before refactoring. This analysis can help identify...
    See more | Go to post

    Leave a comment:


  • Arushi
    replied to Problem with split() and rstrip()
    The correct code to achieve the desired output should be:

    Code:
    fname = input("Enter file name: ")
    if len(fname) < 1:
    fname = "mbox-short.txt"
    
    fh = open(fname)
    count = 0
    for line in fh:
    if line.startswith('From:'):
    pass
    elif line.startswith('From'):
    words = line.split()
    email = words[1]
    print(email)
    
    count = count + 1
    ...
    See more | Go to post

    Leave a comment:


  • Arushi
    started a topic What are your thoughts on Java inheritance?

    What are your thoughts on Java inheritance?

    Which changes do I need to make to the code below in order for a.f2(); to work?

    Code:
    public class A {
      void f1(){}   
    }
    
    public class B extends A {
      void f2(){}
    }
    
    void main(String[] args) {
      A a =  ...     <- free space here
      a.f1();
    }
    I've been asked to change the way I added void f2(){} to class A.

    No additional free space...
    See more | Go to post

  • Arushi
    replied to c# call stored procedure webservice
    You will need to use a SqlCommand object to call the stored procedure, and pass the output parameter as a parameter to the command. You will also need to set the SqlCommand object's CommandType property to CommandType.Sto redProcedure, and set the SqlCommand object's Parameters property to a SqlParameterCol lection object, where you can add the output parameter.

    Code:
    For example:
    
    using (SqlCommand cmd = new SqlCommand("spCreateRequestDeductible",
    ...
    See more | Go to post

    Leave a comment:


  • Arushi
    replied to JavaScript Chart Libraries
    There are many great React charting libraries available, but some of our favorites include React-vis, Victory, and React-chartjs-2.
    See more | Go to post

    Leave a comment:


  • Arushi
    replied to OOP Accessing data from a different method
    in .NET
    The simplest solution would be to make the List a member variable of the class:

    Code:
    public class MyClass
    {
        private List<AcctRec> AcctsList = new List<AcctRec>();
     
        public void ReadAccounts()
        {
            // Read the accounts into the list
        }
     
        public void DisplayAccounts()
        {
            // Process the list
        }
    }
    See more | Go to post

    Leave a comment:


  • You cannot combine two items in a Group By while doing a Crosstab query.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...