User Profile
Collapse
-
That's exactly what I was looking for, Banfa, thank you so much! -
Estimating the highest value in a set one element at a time
Hi folks,
I'm having trouble remembering the name of an algorithm I now am trying to reproduce.
The basics of the problem are as such:- Given a finite set of a known length
- Look at the first item in the set.
- Choose whether to accept that value, or look at the next one
- Optimize for the best result, never being able to revisit prior values
So for instance, given a set of numbers [8,23,5,192,3,56 ,9,11,34,85,23, 50,31,5],... -
-
If I were to attack it, I would use a breadth first search to generate the paths. You stop when you reach a solution.
If the lengths matter, I would apply Djikstra using the above technique....Leave a comment:
-
To write to a file in the current working directory (the directory the user is currently in) you would just write to 'Answers.txt'.
To write to the directory that the script is in, you would write to os.join(sys.pat h[0], 'Answers.txt')Leave a comment:
-
-
There is a lot of good information about scapy out there, and I can't claim to be an expert. With regards to discovering access points, you may want to check out this link: http://www.devx.com/security/Article/34741/1954
Most of your questions require in-depth knowledge of 802.11x in order to give scapy the correct parameters. I would suggests some careful Googling on each particular point, and use that to build you feature-set.Leave a comment:
-
It depends. How did you get said UDP packet?
Are you using the socket library or another library like scappy or pycap?Leave a comment:
-
Following on the heals of Glenton's questions: what is the determining factor for removing 'ttttt'? Are you looking to remove the nth element of the string or an exact substring?Leave a comment:
-
The Python SSL Documentation has two examples of reading the SSL certificate information.
Client Side
Server SideLeave a comment:
-
You will need to use the os module's function rename:
Code:import os os.rename('/home/motoma/testfile', '/var/www/motomastyle.com/index.html')
Leave a comment:
-
You are correct, in this case, item[0] represents 'a', 'b', or 'c'.
[] signifies an empty list. If you look at the documentation for setdefault, it will return a the value of the dictionary element specified in the first argument, or, if it has no value, it will return the second argument.Leave a comment:
-
If you take a look at your code, you will see that you have defined two functions, average and standardDev, but you never actually called them!
The code below shows you what you were missing:
Code:def average(values): average=sum(values)/float(len(values)) return average def standardDev(average, values): total = 0 for i in values: total +=(average-i)**2
Leave a comment:
-
Hi suppoor,
Are you able to get the communication working without SSL? If you remove calls to ssl.wrap_socket , does the sever-client system function properly?
If so, please post the SSL specific code you have so that we may take a look at how you initialize the SSL wrapper.
If not, your problem likely lies somewhere other than in the SSL code.
Cheers,
MotomaLeave a comment:
-
Hi, when can I get in touch with you live online ? -
Yeah, I was hoping for some sexy CSS that would do the work for me :)Leave a comment:
-
Are you suggesting that I should, on resize, rearrange each div into the appropriate number of colunms?
That's a terrible hack, and it introduces the problem of measuring the heights of each element to get evenly tall columns.Leave a comment:
-
-
How do I stack divs vertically?
Hello all!
My end goal is to create an HTML layout that will expand and contract with the window size, while maintaining a variable number of content columns.
In the example below, you will see that if you stretch the browser window until there is two columns, divs on the right stack flush with each other vertically; however, divs on the left also stack flush with the divs on the right, leading do some gaps in the layout.... -
Hey boss,
Haven't been around for a while...
What's the deal now, no new posting or am I missing something?
Cheers
/MK
No activity results to display
Show More
Leave a comment: