# Search:

Type: Posts; User: Paul Miller; Keyword(s):

Page 1 of 6 1

## Search: Search took 0.01 seconds.

by Paul Miller
Replies
4
Views
568

### Re: most sustainable file format - an address book

Another +1 for vCard. It's made for this specific application, and it's recognized by tons of address book apps and email clients.
2. ## Thread: python "fast" filename

by Paul Miller
Replies
4
Views
364

### Re: python "fast" filename

Sure. Save the data to a cStringIO object rather than a file.
3. ## Thread: deck of cards c++

by Paul Miller
Replies
7
Views
1,701

### Re: deck of cards c++

Just a quick question... are you interested in the answer to this question for its own sake, or are you doing this as a programming exercise? If the former, there's an easy way to calculate the...
4. ## Thread: Recursion in Python

by Paul Miller
Replies
7
Views
473

### [SOLVED] Re: Recursion in Python

This sounds distressingly like a homework assignment, but I'm going to assume it's not.

In Python:

def myLuc (n):
if n == 0 or n == 1: return n
else: return 3 * myLuc (n-1) -...
5. ## Thread: atoi and getchar C programming

by Paul Miller
Replies
19
Views
3,142

### Re: atoi and getchar C programming

Unless the assignment specifies you must do so, why bother converting the char to an int at all? Just check to see if it's '1', or '2', or something else, and act accordingly. :-)

by Paul Miller
Replies
0
Views
219

### Linkifying a PDF with Python

Does anyone have any example code that opens a PDF file in Python and adds a link to it? I've been reading documentation for python-pypdf and python-reportlab, but I haven't been able to make any...
7. ## Thread: Project Euler 26...

by Paul Miller
Replies
7
Views
2,597

### Re: Project Euler 26...

This one is easier to solve mathematically than to write a program for it. I'd suggest looking at a couple elementary number theory books.
8. ## Thread: bash command to kill all processes of a user

by Paul Miller
Replies
2
Views
7,610

### Re: bash command to kill all processes of a user

I can't help but notice how Cthulhu-esque that command string looks. :P (Appropriate, too, if it does what you're claiming -- I don't doubt it does, but I'm too lazy to look at the man page for...
9. ## Thread: how to search a two dimensional array

by Paul Miller
Replies
10
Views
793

### Re: how to search a two dimensional array

Unless you know something further about the elements of the array, there is no more efficient method of searching than simply iterating through every element. Think about it: unless there's some...

by Paul Miller
Replies
9
Views
483

### Re: python question(again!)

No, your first while loop is not being ignored. It's just that when x > y, the value of

seq[x:y]

is

''
11. ## Thread: Tkinter (Python) running from command line.

by Paul Miller
Replies
5
Views
3,780

### Re: Tkinter (Python) running from command line.

This, too, may be sort of obvious, but if you have the shebang line, you don't need to name the file ending with ".py" to get Python to recognize it. So, you could even save your file as...
12. ## Thread: a little schcme/lisp question

by Paul Miller
Replies
8
Views
538

### Re: a little schcme/lisp question

The cond special form evaluates the conditionals lazily. Your new-if function has to evaluate predicate, then-clause, and else-clause every time, even if (for instance) the predicate is true.

by Paul Miller
Replies
7
Views
1,199

### [ubuntu]Re: Firefox 3.5.1?

I'm using the version from the Jaunty repos right now and, other than a couple of add-ons I had to replace, it's working great. I've noticed a definite speed increase. Too bad it isn't as fast as...
14. ## Thread: I'm curious... ATI vs. Nvidia

by Paul Miller
Replies
13
Views
1,130

### [all variants]Re: I'm curious... ATI vs. Nvidia

The impression I'm getting is that ATI cards work serviceability well, but if you need tonnes of raw performance, it's nVidia all the way. Is that correct?

Personally, I don't run anything any...
15. ## Thread: A little python help, not that hard a question probably

by Paul Miller
Replies
10
Views
791

### Re: A little python help, not that hard a question probably

It sounds like you should look at a basic wxPython tutorial, like the one at http://www.wxpython.org/tutorial.php .
16. ## Thread: Matrix Inversion on CUDA

by Paul Miller
Replies
4
Views
8,427

### Re: Matrix Inversion on CUDA

This paper's author claims to have achieved ~300 Gflops using parallel LU on a GPU.
17. ## Thread: I'm curious... ATI vs. Nvidia

by Paul Miller
Replies
13
Views
1,130

### [all variants]I'm curious... ATI vs. Nvidia

Since all of my current machines use Nvidia cards, I was wondering, should I choose to build a new system, how well do ATI cards work with Ubuntu compared to Nvidia cards? I have, in fact, never had...
18. ## Thread: Giving away a simple math lexer/parser.

by Paul Miller
Replies
1
Views
1,588

### Re: Giving away a simple math lexer/parser.

This is a great example project for someone interested in how parsers or compilers work. You should put this on some coding web site rather than just posting it here and letting it get buried in the...
19. ## Thread: Python vs Bash Challange

by Paul Miller
Replies
32
Views
7,772

### Re: Python vs Bash Challange

So, is this challenge closed (awk FTW?), or are you still looking for a python version for comparison?
20. ## Thread: Source code of cal in UNIX

by Paul Miller
Replies
7
Views
939

### Re: Source code of cal in UNIX

From UNIX v7:

char dayw[] = {
" S M Tu W Th F S"
};
char *smon[]= {
"January", "February", "March", "April",
"May", "June", "July", "August",

by Paul Miller
Replies
2
Views
388

### Re: Restricting Python

The short answer is: if you're embedding it in a C or C++ app, you can't really do that efficiently.

A slightly longer answer is: You really either need to trust your users or not allow...
22. ## Thread: My first Python code

by Paul Miller
Replies
34
Views
2,772

### Re: My first Python code

I don't think .readlines() is faster than for line in file because .readlines() is implemented in C. Rather, it's because .readlines() slurps the whole file into memory first (using buffered IO),...

by Paul Miller
Replies
1
Views
314

### [all variants]Re: Minimizing menu clutter

Bump for the evening crew.
24. ## Thread: drapes won't open anymore

by Paul Miller
Replies
4
Views
1,020

### [ubuntu]Re: drapes won't open anymore

Try running drapes from the terminal. What error does it give?

As for the fix, doing

sudo apt-get purge drapes && sudo apt-get install drapes

will probably fix it.
25. ## Thread: Random wallpapers - but only from selected

by Paul Miller
Replies
8
Views
1,584

### [gnome] Re: Random wallpapers - but only from selected

You want to install drapes.

sudo apt-get install drapes

Then start it up with

drapes &
Results 1 to 25 of 129
Page 1 of 6 1