# Search:

Type: Posts; User: Modred; Keyword(s):

Page 1 of 5 1

## Search: Search took 0.01 seconds.

by Modred
Replies
8
Views
1,986

### Re: Learning LISP

I've been a vim user for something approaching four years, and it's my default editor for almost everything, from plain text to C++ to Rails projects. However, there are two things that I absolutely...
2. ## Thread: Arrays in Python

by Modred
Replies
2
Views
318

### Re: Arrays in Python

To create a list of length n with a default value x for all values in the list, try the following:

[x]*n

For example, [0]*10 gives the list [0, 0, 0, 0, 0, 0, 0, 0, 0, 0].
3. ## Thread: [SOLVED] Simple Encryption/Decryption Algorithm (Python)

by Modred
Replies
20
Views
22,518

### Re: Simple Encryption/Decryption Algorithm (Python)

Without the modulus, it's just a straight substitution. Frequency analysis will take it down quickly. If the attacker can't do frequency analysis, then you might be fine. But it's quite easy to...
4. ## Thread: [SOLVED] Simple Encryption/Decryption Algorithm (Python)

by Modred
Replies
20
Views
22,518

### Re: Simple Encryption/Decryption Algorithm (Python)

Now you're getting close to an Affine cipher, where K1 = K2. As I mentioned in my edit of the last post, you can't arbitrarily choose your key anymore, or else you might not get the same message back...
5. ## Thread: [SOLVED] Simple Encryption/Decryption Algorithm (Python)

by Modred
Replies
20
Views
22,518

### Re: Simple Encryption/Decryption Algorithm (Python)

That's exactly what I'm saying. Assuming you're encrypting English, you have an alphabet 26 letters long. If your key is 5, then a will encrypt to 5 (assuming we start at 0). If your key is...
6. ## Thread: [SOLVED] Simple Encryption/Decryption Algorithm (Python)

by Modred
Replies
20
Views
22,518

### Re: Simple Encryption/Decryption Algorithm (Python)

If I know your alphabet, I can take all the integers in your cipher text and compute their equivalent modulo the size of the alphabet. Adding arbitrarily large numbers does not change the size of...
7. ## Thread: In search of a MySQL database module for python

by Modred
Replies
2
Views
256

### Re: In search of a MySQL database module for python

sudo apt-get install python-mysqldb

http://mysql-python.sourceforge.net/

Alternately, you might want to check out something like SqlObject or SqlAlchemy, so that you get a high-level db...
8. ## Thread: [SOLVED] Subversion. Is it right for me?

by Modred
Replies
10
Views
614

### Re: Subversion. Is it right for me?

I've personally started migrating all of my personal projects to bazaar, which is a distributed revision control in a similar vein to BitKeeper or git. It seemed a bit more friendly to someone like...

by Modred
Replies
6
Views
2,827

Since you already know Python, you might want to investigate TurboGears or Django for dynamic web development.

But if you just want a blog up and running, then you might do well to just use...
10. ## Thread: [RubyOnRails] Looking for an applications to look at

by Modred
Replies
7
Views
283

### Re: [RubyOnRails] Looking for an applications to look at

I've had a good experience with acts_as_authenticated, which apparently forked from LoginGenerator.

by Modred
Replies
4
Views
246

### Re: Software patents?

I wouldn't let the fear of patent lawsuits prevent you from releasing your projects, unless you knowingly violated a patent. If your software were to gain enough prominence that a patent holder, or...
12. ## Thread: Python or PHP?

by Modred
Replies
29
Views
2,175

### Re: Python or PHP?

On the "less expensive" note, I've seen VPS hosting with Python installed (and you can ssh in to add more modules yourself) for as low as \$6.95/month.

Lack of a 1.0 release hardly means that...
13. ## Thread: python crawler code - what's wrong?

by Modred
Replies
7
Views
840

### Re: python crawler code - what's wrong?

'path' is not a reserved word in Python, but it is the name of a module. So it isn't necessarily going to create problems, but it could, depending on how the imports are written. Anyway, probably a...
14. ## Thread: python crawler code - what's wrong?

by Modred
Replies
7
Views
840

### Re: python crawler code - what's wrong?

Around line 24, what is "newpath"? It isn't given a value before this line, so trying to find the end of a nonexistent string will fail.

def filename(self, url, deffile='index.htm'):
...
15. ## Thread: Python just a starting point?

by Modred
Replies
20
Views
961

### Poll: Re: Python just a starting point?

I don't believe the members stating "start with Python, it's good for learning to program, then learn C/C++/Java/whatever" mean that Python is a weak language. Rather, I think it's directed to the...
16. ## Thread: how to replace line from file.

by Modred
Replies
6
Views
453

### Re: how to replace line from file.

A more common practice would be to read in sizable chunks and then parse the records from a pool of cached data. You need to add some checks to ensure you get complete records off the end of a...
17. ## Thread: how to replace line from file.

by Modred
Replies
6
Views
453

### Re: how to replace line from file.

In general, because a text file stores information as characters and each character takes up (normally) one byte of space, different sized numbers take different amounts of storage space to...
18. ## Thread: Java seems harder than C++

by Modred
Replies
60
Views
11,247

### Re: Java seems harder than C++

I cannot agree more. Our university switched the introductory programming courses from C++ to Java this semester, and I had the lovely job of TAing for this first semester. Perhaps it was just a...
19. ## Thread: matchitand filetype plugin for vim

by Modred
Replies
1
Views
322

### Re: matchitand filetype plugin for vim

Using the DocBook filetype (docbk) results in matchit not functioning for me, as well. My guess is that vim doesn't apply XML rules to DocBook files, although I don't know why that would be. I...
20. ## Thread: Ruby on Rails IDE

by Modred
Replies
17
Views
12,984

### Re: Ruby on Rails IDE

I do my Rails work in Vim with the rails plugin. Without the plugin, the directory of a Rails app would be almost impossible to navigate efficiently; however, the plugin simplifies it to something...
21. ## Thread: [SOLVED] Gvim Help.

by Modred
Replies
8
Views
720

### Re: Gvim Help.

As a note, if you try to compile C++ code with gcc, you will get a bunch of errors. The point is you can type any command after a ! that you would type on the command line. Just change gcc to g++....
22. ## Thread: [SOLVED] Gvim Help.

by Modred
Replies
8
Views
720

### Re: Gvim Help.

Generally, typing make will look for a Makefile that defines targets for compilation. Note that you never have to leave Vim to type something from a terminal. Just prepend your command with a !.
...
23. ## Thread: Editing config scripts with a shell script

by Modred
Replies
3
Views
376

### Re: Editing config scripts with a shell script

The sed program can probably fit your needs.

#!/bin/sh
sed -e '\$ i\
First line to insert \
Second line to insert \
third line to insert \
last line to insert' temp_config_file

by Modred
Replies
1,444
Views
154,238

### Re: The "Bye, Ubuntu" thread

Don't blame GNU/Linux developers for wireless problems; that problem rests almost entirely with hardware manufacturers who refuse to release open specifications of their products. Writing drivers...
25. ## Thread: newb on a mission

by Modred
Replies
13
Views
3,062

### Re: newb on a mission

If all of the listed package are installed, then you should be able to write programs using gtk2.

Unless I'm mistaken, libgtk2.0.0-bin and libgtk2.0.0-common are used for running gtk2 based...
Results 1 to 25 of 107
Page 1 of 5 1