-
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, … -
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 … -
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 … -
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. -
Replied To a Post in Random Facts
Imagine termites taking over your computer. -
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 … -
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. -
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. -
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 … -
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 -
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. … -
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! -
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,) # … -
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? -
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? -
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 … -
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 … -
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 -
Replied To a Post in fossil
Sounds too easy. -
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. -
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. -
Replied To a Post in What are you eating/drinking right now?
Some local goat cheese, bread and California wine. -
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. -
Replied To a Post in Increment operator
This might shed a little light on it ... a = 5; cout << a << " " << ++a << " " << ++a << '\n'; -
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 … -
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. -
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 … -
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/ -
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 -
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 … -
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 … -
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 … -
Replied To a Post in Some number tricks (golang)
Sorry, OS X gives me spaces and Windows gives me tab indents. Fixed it. -
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. -
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. -
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. -
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. -
Replied To a Post in Windows to OSX switch
Thanks ddanbe, I am fiddling with `#include <sys/time.h>` -
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 … -
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." -
Replied To a Post in What are you eating/drinking right now?
Braised lamb shank, "vegies" and some fine California red wine. -
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 … -
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 … -
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 … -
Replied To a Post in BOOK
Are you willing to pay for that book? -
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. -
Replied To a Post in Flexible programming language
Have you asked your computer science teacher for a recommended language? -
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 … -
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 … -
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.