baavgai's Profile User Rating: *****

Reputation: 6507 Overlord
Group:
Mentors
Active Posts:
13,829 (4.55 per day)
Joined:
16-October 07
Profile Views:
145,362
Last Active:
User is offline Yesterday, 06:14 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
775
Expert In:
C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

Latest Visitors

Icon   baavgai has not set their status

Posts I've Made

  1. In Topic: 21 Card Game Homework. I really need help.

    Posted 9 Feb 2016

    What about pop? Where is your confusion?

    From TFM:

    Quote

    list.pop([i])
    Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)
    -- https://docs.python....structures.html


    Confused? No problem. Fire up python and test it yourself.
    >>> a = [1,2,3,4]
    >>> a
    [1, 2, 3, 4]
    >>> a.pop()
    4
    >>> a
    [1, 2, 3]
    >>> a.pop()
    3
    >>> a
    [1, 2]
    >>> len(a)
    2
    >>>
    
    


    Think about how cards a dealt. Dealing a single card is quite simply using pop on the deck.
  2. In Topic: 21 Card Game Homework. I really need help.

    Posted 9 Feb 2016

    No exactly:
    # a function that take the list DECK
    def deckCheck(DECK):
        # prints the length of the list
        print('', len(DECK)) # unclear on the '',
        if len(DECK) < 20:
            # so if the above is true, we return the deck
            # this seems kind of pointless, but ok
            return DECK
        # if we get this far
        # then len(DECK) >= 20 is true
        # and we return
        # NOTHING!
        # this implicitly does the following
        return None
    
    


    Hope this helps.
  3. In Topic: 21 Card Game Homework. I really need help.

    Posted 9 Feb 2016

    Look closely at deckCheck.

    Note, you're returning values way too often. If you pop for your DECK, the object has been changed. There is not need to pass it back. Same with pushing onto HAND.
  4. In Topic: Anyone here uses emacs for editing javascript?

    Posted 8 Feb 2016

    View PostCasiOo, on 08 February 2016 - 06:09 PM, said:

    Visual Studio Code (new, amazing with typescript)


    I love this tool! I've been using it for a few weeks and was impressed after the first few minutes. And, yes, it did get me to learn TypeScript because once you have Intellisense with Node/JS libraries you really don't want to ever not have it. And a decent debugger! And it runs on linux just as well as windows.

    I was pretty lukewarm to TypeScript, as I was to all the other transpiling "I don't like Javascript but must use it" languages. However, strong typing with code complete and "compile" time error checking has made me a fan. That and no more var that = this; and ES6 arrow syntax today.
  5. In Topic: Displaying Figures

    Posted 8 Feb 2016

    A loop is a nice start. One loop will get you a one dimensional figure. But you want a two dimensional figure.

    Here a start, with comments:
    <!DOCTYPE html>
    <html>
    
    <head>
      <title>Histogram</title>
    </head>
    
    <body>
      <!-- if you must use doc write, you should bloody well 
    	  be in the body of the doc -->
      <script type="text/javascript">
        var number = 5; // because life is too short for me to type 
    
        // you forgot a var here
        // var counter = number * 2;
        // actually, it's not a well named var
        var rows = number * 2;
        // you want another
        var cols = number * 2;
    
        // wtf would you use table?!?
        // document.writeln("<table>");
        document.writeln("<pre>");
    
        // now, some nice var names
        //for (var i = 0; i < counter; ++i) {
        for (var row = 0; row < rows; row++) {
          // well, we've done rows...
          // perhaps we want columns?
          for (var col = 0; col < cols; col++) {
            // well, we probably want some cool pattern in here
            // just to give an idea
            var isLit = (row + col) % 2;
            document.write(isLit ? "*" : "-");
          }
          document.writeln("");
        }
    
        document.writeln("</pre>");
      </script>
    
    </body>
    </html>
    
    


    Also here: http://plnkr.co/edit...0pYso?p=preview

    That's a basic framework. It's up to you to take it from there.

    Hope this helps.

My Information

Member Title:
Dreaming Coder
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Jersey, be afraid.
Years Programming:
25
Programming Languages:
Most.

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://

Comments

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  1. Photo

    cpickard2790 Icon

    23 Jan 2016 - 15:04
    I can't say thank you enough for the help you have given me so far! It is appreciated more than you know!
  2. Photo

    vivek_91 Icon

    14 Sep 2015 - 04:26
    Hi,
    First time, I am using white automation framework.
    Can you please let me know how to use ItemType property if Automation Id is not given using White?
    and how to draw a line in writing type application using white??
  3. Photo

    mireille4U Icon

    30 Apr 2015 - 05:26
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address ([email protected]) i will give you my picture.here is my mail address i hope we can move from here.above. Mireille
  4. Photo

    ImChicago Icon

    17 Mar 2015 - 17:34
    Hey, im new to coding, how do you recommend starting? What should I master first? Should I use a website to help me?
  5. Photo

    8byte Icon

    10 Jan 2014 - 11:08
    Awesome, thanks for all the help!
  6. Photo

    codiddle Icon

    07 Mar 2013 - 18:59
    GENIUS GUY HERE MAN. Write a book!
  7. Photo

    mamelove25 Icon

    19 Feb 2013 - 10:53
    Hello My Dear, My Name is Mame. i saw your profile today and became interested in you,i will also like to know you more,and if you can send an email to my email address,i will give you my pictures here is my email address ([email protected]) I believe we can move from here! Am waiting for your mail to my email address above because i have much to tell you,
    love Miss Mame.
  8. Photo

    bilbil0629 Icon

    24 Oct 2012 - 05:39
    hey! you mongolian?
  9. Photo

    Ticon Icon

    20 Aug 2012 - 13:23
    I just noticed your an expert in cheese. I lol'd
  10. Photo

    mostyfriedman Icon

    18 Aug 2012 - 23:13
    Hello there Brett
  11. Photo

    MehrdadSecret Icon

    26 Jul 2012 - 05:51
    hello, can i have a contact email or Yahoo or something? Need ur help badly
  12. Photo

    Jeet.in Icon

    18 Apr 2012 - 23:17
    Thanks ! Solved My problem !
    http://www.dreamincode.net/forums/topic/275578-simple-whitespace-remover/page__gopid__1603556&#entry1603556
  13. Photo

    RetardedGenius Icon

    25 Oct 2011 - 14:29
    I agree so much with your opinion of incompetent CS teachers. So true!
    http://www.dreamincode.net/forums/topic/252848-venting-a-frustration/page__view__findpost__p__1469659
  14. Photo

    WabiSabi Icon

    21 Oct 2011 - 11:00
    I agree with assert(C). However, I'd rather not specify what you are "the best" at.
  15. Photo

    assert(C) Icon

    20 Oct 2011 - 08:38
    You are the best
  • (3 Pages)
  • +
  • 1
  • 2
  • 3