sepp2k's Profile User Rating: *****

Reputation: 2277 Grandmaster
Active Posts:
3,520 (2.17 per day)
21-June 11
Profile Views:
Last Active:
User is offline Private

Previous Fields

OS Preference:
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
Expert In:
C/C++, Functional Programming, Java, Python, Computer Science
Icon   sepp2k has not set their status

Posts I've Made

  1. In Topic: PYqt tutorial gives me an error...

    Posted 22 Nov 2015

    You missed a space on that line.
  2. In Topic: Can someone explain this?

    Posted 22 Nov 2015

    From inside out:

    freq.items() gives you a list of the key-value pairs in freq. The list comprehension [(v,k) for k,v in ...] then takes each such pair, assigns the key and value to k and v respectively and produces the pair (v,k). So we now have a list of value-key pairs. sorted now takes that list and produces a sorted version of it (pairs are compared by first comparing the first element and only comparing the second element if the first is equal, so the key and value were swapped to sort by the value). Then the outer list comprehension again swaps the keys and values, so you get back a sorted (by value) list of key-value pairs.

    PS: The sorted function can also be given a comparison function as its second argument, so you accomplish the same thing without swapping the pairs and swapping them back.
  3. In Topic: Beginning Git (Version Control)

    Posted 22 Nov 2015

    View Postkathy025, on 22 November 2015 - 06:08 AM, said:

    Where does it say it's "commit #1" or "commit #2" (since both of them are green boxes)?

    It doesn't. I just gave them sequential numbers to refer to them because I didn't want to spell out their hash or commit message. Git doesn't assign sequential numbers to commits.

    It might have been clearer had I said: The branches clone-master and master are at commit "modified in master branch" and the branches clone-kat-develop and kat-develop are at commit "edited in kat-develop branch" (as signified by the green boxes).
  4. In Topic: Beginning Git (Version Control)

    Posted 21 Nov 2015

    You have two commits. The second one is the commit you're currently at as signified by the yellow dot (as signified by the yellow dot as opposed to blue dots for other commits). The second commit is a direct child of the first one (as signified by the fact that there's a line between them). The branches clone-master and master are at commit #1 and the branches clone-kat-develop and kat-develop are at commit #2 (as signified by the green boxes). Your current branch is kat-develop (that's why it's bold).
  5. In Topic: preprocessor directives in class declaration file

    Posted 18 Nov 2015

    View PostCTphpnwb, on 18 November 2015 - 03:51 PM, said:

    Now what will happen if your code is included by two different .cpp files?

    The header will be included in both (which pre-processor constants were or weren't defined in one compilation unit does not affect the pre-processor in a different compilation unit at all). Header guards are about what happens if the same header is included multiple times in the same compilation unit.

My Information

Member Title:
D.I.C Lover
Age Unknown
Birthday Unknown
Years Programming:
Programming Languages:
Haskell, Ruby, OCaml, SML, F#, Scala, Racket/Scheme, Vala, C#, C++, Java

Contact Information

ICQ  205544826