-
Posts
18 -
Joined
-
Last visited
Posts posted by adamzap
-
-
first, get the <input> element of the password field
then, do the following with it:
pw_field.setAttribute('maxlength', 128);
i'm assuming you know how to get the element though.
if you know the id, its easy:
var pw_field = document.getElementById('pw_field_id')
if you dont know the id, you can loop through the inputs on the page:
var inputs = document.getElementsByTagName('input'); var pw_field; for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == 'password') { pw_field = inputs[i]; } }
-
body { display: none; }
-
The problem is that you are drawing vertical lines on each side of a '1' bit even if there is another '1' bit on the side of it. You have to check around the current position for a '0' bit before drawing a vertical line.
This is a fixed version of your code. Hope that helps!
This (code) is a more flexible version I wrote that might impress your teacher more ;)
(reload mine a few times, the extra lines are random)
Cool exercise!
-
yeah, if you give it a jpg or twitpic link, it should work
-
I see it did work but it replied "@Darren Kitchen" instead of @hak5darren so I didn't see it right away.
I'll have a look at the script and try to feature it on the show we're shooting tonight (413). I don't have a lot of python experience but I can tweak just about anything that's well commented and this looks to be (as well as hella tight dude)
Ugh sorry...that's a bug. Here's the script with the fix (also fixed the link in my original post). I had name where I needed screen_name, and I didn't set my test account's name so I didn't notice
I'll make this fix live on @upc_test tomorrow night.
ok so what do i have to do compile the code and then what?haha
where do i post it so that i can text/email from my phone to check the barcode in the database
Just message a direct image link to @upc_test on twitter. If you want to run the code on your own bot account, you just need a recent install of python and the python-twitter module.
-
I just tried the twitter bot. Haven't gotten a reply back but it's only been about 5 minutes.
I sent a link to this image: http://www.hak5.org/temp/code2.jpg (The 2600 magazine bar code)
It has worked by now...the Twitter API doesn't seem to be exactly up to the minute I guess...
I'd love to see what kind of code you guys are using.I implemented this bot in Python. Here's the code. I added lots of probably unnecessary comments in case anyone has trouble following. You need djpeg and gocr in your path. You also need to be able to write to the current directory and items.csv from upcdatabase.com needs to be in the same directory as the script. I don't do any explicit checking for any of this...the code is just a quick hack that works.
If anyone wants me to polish up this code for further development or use, just let me know.
Not to derail this but on a semi-related topic I was working in great length building a twitter bot using the twitter XMPP when they supported IM. I really wanted to finish the twitter bot I was writing but got sidetracked.Let me know if you need another coder on this.
What Twitter code are you using?I am using python-twitter, and it is wonderful.
-
I've got a prototype up at @upc_test on twitter. Feel free to reply to @upc_test with an direct barcode image url or twitpic link.
I'll be checking it manually for a few hours, but I should have the script on minutely cron tonight.
The real limitation here seems to be the upcdatabase.com data.
-
A lot of people call Python executable pseudocode ;)
Don't use Python to create very intensive math applications.?
-
Opeth
Bloodbath
Between the Buried and Me
Dream Theater
Rush
Diabolical Masquerade
NES and SNES music
Nobou Uematsu and other video game composers
Basically progressive metal, death metal, and vg music ;)
EDIT: Oh I forgot, Tim and Eric too
-
Yeah, what's really important is that you find language in which you can efficiently translate your ideas into working code. That's all that really matters :)
-
both still require that the libraries already be installed, if not you now have to package the libraries (multiple megs) with your python code (probably only a few hundred kb tops). And you cant just give that to any of your friends, in a single file, so you get stuck either telling them to drag n drop a 10+ mb folder for a tiny program, or your making 2-4 mb separate packages for each one, which is still an ugly hassle.
From my understanding, if you have Python, you have Tkinter.
If you must package your Python app, you can use great tools like py2exe and py2app. In my opinion, the time you will save and the code readability you will achieve is well worth the other party dealing with a larger file (in the case that external modules must be included). ;)
-
python is also very easy, but again if you want to make stuff with a GUI your sol, python will go from crosplatform to tied down to a specific platform fast. (w/ the exception of teh GTK, but thats still a bit complicated and requires it be installed on the windows machine and then no OSX unless they go get a buggy diffrent project and so forth, just not worth it)
What about wxPython and Tkinter? They both come with python and run on Mac/Linux/Windows...
-
-
I'd suggest diving in with any language (though I recommend Python)
Think of some simple tasks to manipulate your filesystem or maybe catalog your music (or automate things like you said). Simple projects like these will teach you many core programming concepts, and you will be able to continually build on them to make them better and more useful.
A quick search revealed this free online book for learning programming with Python: http://www.freenetpages.co.uk/hp/alan.gauld/
-
Have you considered using screen?
-
Have you considered Python?
What project do you have in mind? (If you don't mind sharing)
iPhone Developers
in Applications & Coding
Posted
Yes
I have one simple guitar chords app out
iPhone dev is wonderful
Reviewers on the app store are stupid though. I think it's pretty easily gamed.