Search Results

Showing results 1 to 31 of 31
Search took 0.01 seconds.
Search: Posts Made By: tdeck
Forum: Python 18 Days Ago
Replies: 4
Views: 202
Posted By tdeck
Thanks for that. Weirdly enough, what I'm doing is actually related to counting word frequencies.

I realized that I can just use .items() (feels silly) :)
Forum: Python 18 Days Ago
Replies: 4
Views: 202
Posted By tdeck
Ideally I'd like to do it with a list comprehension. Something like this result = [(key, value)for key in dict.keys(), value in dict.values()] but clearly that isn't the right format. Any...
Forum: Computer Science Aug 5th, 2009
Replies: 16
Views: 1,013
Posted By tdeck
I think the big problem would be coming up with some sort of "DNA" language for the "cells" that would have a chance of doing anything with randomly produced code. Otherwise, what you'd probably have...
Forum: Python Aug 5th, 2009
Replies: 1
Views: 254
Posted By tdeck
I'm having a problem which can be exemplified by this python (3) code:

def askname():
sys.stdout.write("What is your name? ")
x = sys.stdin.readline()
sys.stdout.write("Hello, "+x)

When...
Forum: Python Aug 4th, 2009
Replies: 1
Views: 207
Posted By tdeck
I'm wondering if there's a way to open standard I/O as a stream, so I can write and read character by character. Something like

handle = open(stdio)

Any ideas?
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009
Replies: 2
Views: 294
Posted By tdeck
OK fixed. Here's what I have now:
<html>
<head>
<script language="javascript" type="text/javascript">
function typed(e)
{
var key = String.fromCharCode(e.charCode);
if(key ==...
Forum: JavaScript / DHTML / AJAX Jul 23rd, 2009
Replies: 2
Views: 294
Posted By tdeck
I'm trapping the onKeyPress event of a textarea, and I'm wondering if there's a way to prevent the key from also being typed into the textarea if it's a certain key. I have tried stripping off the...
Forum: C# Jul 23rd, 2009
Replies: 2
Views: 407
Posted By tdeck
Thanks, that works the way it should! Apparently what made the difference was the use of a new name for the created arrayList.
Forum: C# Jul 23rd, 2009
Replies: 2
Views: 407
Posted By tdeck
I'm probably going about this in the wrong way, but I have a stack of Objects, and some of these can be ArrayLists. I want to be able to pop an object that is actually an ArrayList off the stack,...
Forum: Legacy and Other Languages Jul 17th, 2009
Replies: 3
Views: 953
Posted By tdeck
Wow, things are slow around here. It was like the 4th post from the top :).
Forum: C# Jul 17th, 2009
Replies: 6
Views: 353
Posted By tdeck
Yeah I just wrote a Python script to fix the files. Python's pretty quick to write, this is the first time it has frustrated me :).
Forum: C# Jul 17th, 2009
Replies: 6
Views: 353
Posted By tdeck
Hmm... I think it's the input file I used. It's generated from a python script, and I think the script replaced the \n with \r\n. So, since I'm sending \r\n, it puts \r\r\n in the file. Which, oddly,...
Forum: Legacy and Other Languages Jul 17th, 2009
Replies: 3
Views: 953
Posted By tdeck
I know a little bit of Scheme, which is a dialect of Lisp.

It would help if you could explain better what you're trying to do. Maybe post some python code that you've written.
Forum: Legacy and Other Languages Jul 17th, 2009
Replies: 3
Views: 673
Posted By tdeck
If you could upload the file somewhere and post a link (as long as it's not something confidential), I could take a look at the format and see if I can hack together some kind of program to parse out...
Forum: C# Jul 17th, 2009
Replies: 4
Views: 149
Posted By tdeck
kspriya01, for future posts, put the question in the post title. Then explain it a bit more in the post itself. That will help people to better answer your questions for you.
Forum: Python Jul 17th, 2009
Replies: 3
Views: 885
Posted By tdeck
What line.strip() is doing is removing whitespace from the ends of the string. If the line is completely empty, or it's only spaces and tabs, line.strip() will return an empty string '' which...
Forum: C# Jul 17th, 2009
Replies: 6
Views: 353
Posted By tdeck
As far as I can tell, this method is returning a blank line every other line, but I can't figure out why:
public static List<string> plain(string path, int num)
{
...
Forum: C# Jul 8th, 2009
Replies: 3
Views: 381
Posted By tdeck
OK. How do I make my code work?
Forum: C# Jul 8th, 2009
Replies: 1
Views: 263
Posted By tdeck
Maybe this link (http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/48459f3a-0819-4ab2-ad50-10cb0de47b39) will be helpful. It discusses using an enum for the type of a column.
Forum: C# Jul 8th, 2009
Replies: 3
Views: 381
Posted By tdeck
I'd like to extract a column from a dataGridView and add it to a dataSet. Apparently I can't cast a dataGridViewColumn to a dataColumn like this DataColumn col = (DataColumn)inputGrid.Columns[0];...
Forum: C# Jul 8th, 2009
Replies: 1
Views: 375
Posted By tdeck
In case anyone's curious, I finally found the solution to this problem here (http://stackoverflow.com/questions/520914/how-to-set-datagridview-column-properties-for-automatically-generated-columns)....
Forum: C# Jul 7th, 2009
Replies: 1
Views: 375
Posted By tdeck
I've managed to figure out how to create tables in a dataset, fill them with data, and link one of those tables to be displayed in a DataGridView. It works great when the selectionmode is by row, row...
Forum: C# Jul 6th, 2009
Replies: 9
Views: 603
Posted By tdeck
>> but that's probably not the most elegant solution.
>Why not?!?

Well, if it didn't check the value against a range at all, that would be the most elegant solution.

Thanks for posting that...
Forum: Legacy and Other Languages Jul 6th, 2009
Replies: 10
Views: 40,569
Posted By tdeck
You will probably be able to get it to work on all modern Windows based machines (and Linux too) under QB64 (http://www.qb64.net/). QB64 is a QuickBasic compatible compiler that's under development,...
Forum: C# Jul 6th, 2009
Replies: 9
Views: 603
Posted By tdeck
OK I understand that. In the program I am writing there is a feature that generates a list of random integers in the range of MIN to MAX, where MIN and MAX need to be inputted by the user. So I...
Forum: C# Jul 6th, 2009
Replies: 9
Views: 603
Posted By tdeck
But, if you set increment to 1 won't it only accept integer values?
Forum: C# Jul 6th, 2009
Replies: 9
Views: 603
Posted By tdeck
Well, it certainly doesn't like me to leave the maxiumn/minimum properties blank. What would be the best option, then, to allow someone to enter any integer. I guess I could always use a regular...
Forum: C# Jul 6th, 2009
Replies: 9
Views: 603
Posted By tdeck
Is there a way to use the NumericUpDown control without a maximum or minimum value?
Forum: C# Jul 2nd, 2009
Replies: 5
Views: 314
Posted By tdeck
Thanks for posting your code sknake, it's really helpful for a newbie like me to see how these things are used :).

Just a side question, Is there a way to bind the list of tables in a dataset to...
Forum: C# Jul 2nd, 2009
Replies: 5
Views: 314
Posted By tdeck
Thanks, I didn't actually realize there was a DataTable type. C# has a much wider set of complex data types than I'm used to from, say, Python.

I'll have to do a bit of rewriting later on today....
Forum: C# Jul 2nd, 2009
Replies: 5
Views: 314
Posted By tdeck
I'm storing a bunch of data in nested collections like this:
Dictionary<string, (holds tables)
.....Dictionary<string, (holds columns)
..........Struct{
...............string type (names the type...
Showing results 1 to 31 of 31

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC