Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~8K People Reached
Favorite Tags
Member Avatar for nunos

Hi all. I have been doing some HTML scraping and today a fellow coder told me about this thing 'DOM' and how much easier it is to use it rather than manipulating strings as I have been doing. He doesn't know much about it, and that's why I came here …

Member Avatar for r8lst
0
795
Member Avatar for nunos

Hello all. Even though my javascript/ajax knowledge is very low, I would like to be able to do the following, for which I ask you for help: I have a python script that runs from php with exec command. It takes about 5-10 seconds to complete. While the python script …

Member Avatar for twiss
1
1K
Member Avatar for jwenting

Validation whether a string can be parsed to a valid date according to a supplied formatting string (which should conform to the formatting rules as supplied in DateFormat). This version can also flag dates in the past as error (we need that because many of our applications should accept only …

Member Avatar for javaAddict
0
254
Member Avatar for nunos

Hi everyone. I have an homework assignment due next week. Since I am not that knowledgeable in Java, there are many times I get stuck and find myself goggling for answers which sometimes I can't get that fast. Therefore, I would like to use this thread to post several quick …

0
86
Member Avatar for yanw

Hello all, my name is Corey, I am new to DaniWeb, and new to programming. I am very interested in software and java programming, to eventually make it into my profession. I am starting college in the Fall, and want to get a head start. The following post is going …

Member Avatar for BanneyHill
0
280
Member Avatar for nunos

I started learning about backtracking in college and was asked to solve the famous 8 queens problem. I know there are many solutions out there for this, but I would like to get there by myself. However, I am kind of stuck and in need for some guidance here. The …

Member Avatar for 0x69
0
127
Member Avatar for setmenull

i am an IT student maybe 1 1/2 year from now i will be graduated with bachelor degree if i will be luck, at this time i still confused what languages to study hard and to focus more that can help my carrier for the future, now i ask your …

Member Avatar for Nick Evan
0
431
Member Avatar for nunos

I need help with debugging this piece of code. I know the problem is in malloc and free but can't find exactly where, why and how to fix it. Thanks. [CODE] #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include <string.h> #include <sys/wait.h> #include <sys/types.h> #define MAX_COMMAND_LENGTH 256 #define MAX_ARGS_NUMBER …

Member Avatar for nunos
0
173
Member Avatar for nunos

Hi. I am complete beginner in databases, so please bear with me stupid questions. I am just doing for fun a simple exercise. A faculty have students and each student have different subjects. My question is, how to store the different subjects in the db? I could make up some …

Member Avatar for apegram
0
157
Member Avatar for nunos

Given a vector of bytes with length multiple of 8, how can I, using mmx instructions, convert all 2's to 5's, for example? [code] .data v1 BYTE 1, 2, 3, 4, 1, 2, 3, 4 [/code] Thanks.

Member Avatar for nunos
0
103
Member Avatar for nunos

Hi. I am looking for a DFA that accepts the language that consist of an even number of 0's and an even number of 1's. Any ideas? Thanks.

Member Avatar for gusano79
0
107
Member Avatar for nunos

I was reading 'Starting Python' trying out in the shell some of the examples. However, I get an error with this [URL="http://www.daniweb.com/forums/post116650.html#post116650"]one[/URL]. What am I doing wrong? [code=python] >>> def sum_average(*args): size = len(args) sum1 = sum(args) average = sum1/float(size) # return a tuple of three arguments # args is …

Member Avatar for woooee
0
129
Member Avatar for nunos

Can someone please tell me what I am doing wrong. I know this is easy, but I haven't managed to make it work properly. [code=python] overwrite = None while overwrite != 'Y'.lower() or overwrite != 'N'.lower(): overwrite = raw_input("Do you want to overwrite (Y/N)? ") [/code] It doesn't exit the …

Member Avatar for sravan953
0
1K
Member Avatar for nunos

I was googling for a way to reverse a string and I found this. [code=python] >>> 'asd'[::-1] >>> 'dsa' [/code] It works, but there was no explanation where I got if from. Can someone please be kind enough to explain it. Thanks.

Member Avatar for nunos
0
322
Member Avatar for nunos

Hello. I have a (main) list of objects 'feedbacks' which have an 'order_id' and a 'message'. I have another list of simply 'order_id's whose correspondent object in the main list I would like to see removed. For example: main list: [object type 'feedback', object type 'feedback', object type 'feedback'] let's …

Member Avatar for nunos
0
332
Member Avatar for nunos

Hi all. I would like to be able to parse some data from a password protected site. The parsing of the data is already developed and tested (I manually logged in to the site and downloaded the source code for testing purposes). I am stuck at the log in part. …

Member Avatar for nunos
0
242
Member Avatar for nunos

Hi. I need some help here with a unicode string I want to use with strptime. [code=python] >>> date u'\xa08/15/2009' >>> datetime.strptime(date, "%m/%d/%Y") Traceback (most recent call last): File "<pyshell#75>", line 1, in <module> datetime.strptime(date, "%m/%d/%Y") UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128) …

Member Avatar for nunos
0
644
Member Avatar for nunos

Hi I would like to know if there is any way to obtain a float result from a division between two integers other than using "from __future__ import division"? I am not looking for the .0 'trick'. Example 4/5.0 = 0.8. I want to be able to do 4/5 = …

Member Avatar for nunos
0
183
Member Avatar for nunos

Hi. I am asking help for something that I have already done. However, I believe there is a much better way to do it. I am pretty novice to python and I don't know (yet xD) all of its capabilities and I am sure some of you will find this …

Member Avatar for nunos
0
82
Member Avatar for nunos

(a | b): For what I have read in other forum post, if a is true, python doesn't evaluate b an returns a. (a & b): What happens with logical and? If a is false, does python evaluates b or not? Thanks for your help.

Member Avatar for nunos
0
409
Member Avatar for nunos

[code=python] class ExcelDocument(): """ Some convenience methods for Excel documents accessed through COM. """ def __init__(self, visible=True): self.app = Dispatch("Excel.Application") self.app.Visible = visible self.sheet = 1 def new(self, filename=None): """ Create a new Excel workbook. If 'filename' specified, use the file as a template. """ self.app.Workbooks.Add(filename) def open(self, filename): """ …

Member Avatar for nunos
0
189