• Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Star expression in for loop

    Advanced unpacking only works with Python3. Here is an example ... # advanced unpacking ... a, b, *rest = range(10) print(a) # 0 print(b) # 1 print(rest) # [2, 3, …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to install modules?

    If the developer used Python2 to develop your program, you might as well install Python 2.7 or you will have lots of errors. Python2 and Python3 are not compatible in …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in raw_input and input in python 2.7

    With Python2 input() uses eval() internally. The eval function can potentially evaluate a statement to erase your harddrive. With Python3 the former input() has been replaced with the functionallity of …
  • Member Avatar for vegaseat
    vegaseat

    Edited Sort a word frequency count (golang)

    A little experiment with custom sorting the result of a word frequency count using Google's Go language.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    Imagine termites taking over your computer.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Sort a word frequency count (golang)

    Sorry, but the Safari browser insists in correcting **golang** to **golfing**. Maybe one way the Apple folks get even with Google. IMHO, the Swift sorting syntax is easier on the …
  • Member Avatar for vegaseat
    vegaseat

    Created Sort a word frequency count (golang)

    A little experiment with custom sorting the result of a word frequency count using Google's Go language.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in What do people think of yeosemite

    I use both OS Yosemite 10.10.3 and Windows 8.1. Yosemite starts growing on you after you learn how to spell it.
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for Swap 2 number without using third variable

    Swap 2 number without using third variable code do not use temp variable for swapping if the code was useful please let me know [code]#include <stdio.h> void main() { int …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Memorable Quotations

    "I don't pay good wages because I have a lot of money; I have a lot of money because I pay good wages." ... Robert Bosch
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Jokes

    After a three-year long study, the National Science Foundation announced the following results on Corporate America's recreational preferences. 1. The sport of choice for unemployed or incarcerated people is BASKETBALL. …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in I might drive you around one day!

    Congratulations! Getting your diploma after five years and finding an interesting job, nice work!
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Starting Python

    # more or less accidentally putting a comma at the end like shown # turns the integer value into a one element tuple x = 123, print(x) # (123,) # …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in C / C++ FAQ's and Practice problems

    Create an array of consecutive prime numbers and check the difference between each of the numbers. Can you discover a pattern?
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Projects for the Beginner

    Create a list of consecutive prime numbers and check the difference between each of the numbers. Can you discover a pattern?
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Starting Python

    ''' switch_case101.py a switch/case like statement to replace multiple if/elif/else statements ''' # make input() work with Python2 and 3 try: input = raw_input except NameError: pass def switch_case(case): return …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to install modules?

    lxml-3.4.4.win32-py3.2.exe works only with Python 3.2 lxml-3.4.4-cp33-none-win32.whl works only with Python 3.3 From http://www.lfd.uci.edu/~gohlke/pythonlibs/ download (under Misc at the bottom of the page) ... xlwt-1.0.0-py2.py3-none-any.whl that works with any Python3 …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to install modules?

    You could download and install the free Anaconda package, it comes with most modules you need preinstalled. See ... http://docs.continuum.io/anaconda/pkg-docs.html
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in fossil

    Sounds too easy.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Flexible programming language

    Would be nice if the OP would tell the rest of us which more flexible programming language was found.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Increment operator

    The moral is that writing code that depends on order of evaluation is a bad programming practice in any language.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in What are you eating/drinking right now?

    Some local goat cheese, bread and California wine.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Timing five isprime functions (Python)

    @slate: checked out your function with a modest failure rate and got about 80 microseconds. The Miller Rabin test took about 11 microseconds.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Increment operator

    This might shed a little light on it ... a = 5; cout << a << " " << ++a << " " << ++a << '\n';
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Code Snippet Ideas

    Prime numbers are only divisible by unity and themselves, integers less than 2 and even numbers other than 2 are not prime. Write a C function to check if a …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Progress of a Bubble Sort (C)

    Sure you can use a while loop, but you have to be carefull not to end up in an endless loop.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Comparing Sorting Routines

    If you cannot use "windows.h", you can go with "sys/time.h". Here is an example looking at insertion sort only ... // // main.c // insertion_sort // // insertionSort101.c // time …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Need For A Complete Compiler

    My rusty brain thinks that graphics.h comes from the ancient Turbo C days. There are ways to still include it in newer compilers, see: http://www.codewithc.com/how-to-include-graphics-h-in-codeblocks/
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Another NULL pointer in fopen

    Sharp eye! Too bad that the compiler does not catch an obvious mistake like this. :) if(fp==NULL) ; // do nothing is correct code
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for Windows to OSX switch

    I am sitting in front of a brandnew 27 inch Apple Macintosh running on OS X Yosemite, trying to compile a timed insertion sort from my Windows days. The Xcode …
  • Member Avatar for vegaseat
    vegaseat

    Edited Windows to OSX switch

    I am sitting in front of a brandnew 27 inch Apple Macintosh running on OS X Yosemite, trying to compile a timed insertion sort from my Windows days. The Xcode …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Windows to OSX switch

    With some more searching and fiddling I came up with this solution ... // // main.c // insertion_sort // // insertionSort101.c // time the insertion sort of an array of …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Some number tricks (golang)

    Sorry, OS X gives me spaces and Windows gives me tab indents. Fixed it.
  • Member Avatar for vegaseat
    vegaseat

    Edited Some number tricks (golang)

    Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.
  • Member Avatar for vegaseat
    vegaseat

    Edited Some number tricks (golang)

    Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.
  • Member Avatar for vegaseat
    vegaseat

    Edited Some number tricks (golang)

    Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.
  • Member Avatar for vegaseat
    vegaseat

    Edited Some number tricks (golang)

    Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Windows to OSX switch

    Thanks ddanbe, I am fiddling with `#include <sys/time.h>`
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for Which Cloud Storage do you like?

    Google Drive, Dropbox, iCloud, and OneDrive are all available to try for free (with limited storage). So far I have used Dropbox and OneDrieve and like Dropbox since it handles …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for QA Session

    Just an accumulation of worldly wisdom in question answer format. Q: "How Do You Get Holy Water?" A: "You Boil The Hell Out Of It."
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in What are you eating/drinking right now?

    Braised lamb shank, "vegies" and some fine California red wine.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Timing five isprime functions (Python)

    I guess, we all need to just google and stop posting. For some odd reason I could never get nzmath to go, all I got is a fistful of error …
  • Member Avatar for vegaseat
    vegaseat

    Created Windows to OSX switch

    I am sitting in front of a brandnew 27 inch Apple Macintosh running on OS X Yosemite, trying to compile a timed insertion sort from my Windows days. The Xcode …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Operations on bits

    You have quite a few errors in your code. Line 16 needs a " Line 27 replace o with 0 Line 32 replace ! with 1 To see what's going …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in BOOK

    Are you willing to pay for that book?
  • Member Avatar for vegaseat
    vegaseat

    Edited Some number tricks (golang)

    Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Flexible programming language

    Have you asked your computer science teacher for a recommended language?
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Help in programming

    You could study Python, a "glue language" for C/C++. It is easy to learn and allows you to develop smaller projects quickly. This might keep you interested in experimenting with …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Jokes

    Some country song titles I like to see: "Her Teeth Was Stained, But Her Heart Was Pure" "I Got In At 2 With a 10, And Woke Up At 10 …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Words and phrases I wish people would stop using.

    "Moving Foreward" implies "just keep moving, no idea where it goes".

The End.