d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Make Me A Better Programmer - From Step 2
Prev13456710Next
Add Reply New Topic New Poll
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 7 2015 09:34pm
PCI compliance is annoying. looking for an RSA encryption in JS that doesn't depend on the browser objects (window, navigator, etc). trying to encrypt it in titanium appcelerator and the lib the vendor gave me uses the browser objects (http://www-cs-students.stanford.edu/~tjw/jsbn/). i'm sticking it into a WebView right now, but i'd rather not if i can help it. i'll play around with it.

a few to look at:
https://www.pidder.de/pidcrypt/
https://github.com/moritzknecht/TiRSA

/edit: on another note, what book you guys recommend on safari books online? anything worth reading, programming or not. i've got a subscription but havent been using it

This post was edited by carteblanche on Apr 7 2015 09:42pm
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 7 2015 10:19pm
If you are looking for books to read for fun then Neuromancer is a decent read.

It's a cyberpunk hacker novel about a rouge AI trying to except the confines of it's container and into the web.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 7 2015 10:24pm
Quote (AbDuCt @ Apr 8 2015 12:19am)
If you are looking for books to read for fun then Neuromancer is a decent read.

It's a cyberpunk hacker novel about a rouge AI trying to except the confines of it's container and into the web.


i've got a list of novels to go through, and that's actually on my wishlist already. i've got 100ish audiobooks that i bought and havent read (damn sales...), and i just found a used book store near my house. bought a dozen books already for around a dollar a pop.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 8 2015 07:40pm
Quote (carteblanche @ Apr 7 2015 11:34pm)
PCI compliance is annoying. looking for an RSA encryption in JS that doesn't depend on the browser objects (window, navigator, etc). trying to encrypt it in titanium appcelerator and the lib the vendor gave me uses the browser objects (http://www-cs-students.stanford.edu/~tjw/jsbn/). i'm sticking it into a WebView right now, but i'd rather not if i can help it. i'll play around with it.

a few to look at:
https://www.pidder.de/pidcrypt/
https://github.com/moritzknecht/TiRSA


i was able to modify the code to get it working. it was annoying because they would catch errors and ignore them. always do something with errors (tip for you, Eep). either throw it or log it or something.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 17 2015 08:59pm
so i finally got around to writing my script to scrape audible's site for book info. for the most part it works well. then i realized the price info was missing. so i'm debugging it for 30 minutes and can't find out what's wrong. then i realize i'm testing it in my browser when i'm logged in, but my script doesn't have a login context. so i open up incognito mode, and sure enough, instead of giving me the price it says "Learn how to get this Free". fuark.

might switch to using python's mechanize. i found it's much easier when i need to actually log in.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 17 2015 09:31pm
Quote (carteblanche @ Apr 17 2015 10:59pm)
so i finally got around to writing my script to scrape audible's site for book info. for the most part it works well. then i realized the price info was missing. so i'm debugging it for 30 minutes and can't find out what's wrong. then i realize i'm testing it in my browser when i'm logged in, but my script doesn't have a login context. so i open up incognito mode, and sure enough, instead of giving me the price it says "Learn how to get this Free". fuark.

might switch to using python's mechanize. i found it's much easier when i need to actually log in.


Should of been using it from the start.

Or webdriver if you need javascript/ajax/other client side scripting support.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 17 2015 10:06pm
well, i picked nodejs and jquery to get some practice in them, then tried to twist their arms to solve side projects i have. thank god i dont have your side projects
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 19 2015 11:08am
Dear diary.

so i looped through my 200k books, hit their url, then scraped the price one by one, prioritizing books with lots of ratings over 5hr long. my app kept running out of memory. i narrowed it down to the jquery. so i had to replace the jquery with indexOf and it's much faster and more stable.

This post was edited by carteblanche on Apr 19 2015 11:19am
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 19 2015 12:10pm
Quote (carteblanche @ Apr 19 2015 01:08pm)
Dear diary.

so i looped through my 200k books, hit their url, then scraped the price one by one, prioritizing books with lots of ratings over 5hr long. my app kept running out of memory. i narrowed it down to the jquery. so i had to replace the jquery with indexOf and it's much faster and more stable.


The moral of this story is not to use jquery to do things that it wasn't meant to do.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 19 2015 12:14pm
Quote (AbDuCt @ Apr 19 2015 02:10pm)
The moral of this story is not to use jquery to do things that it wasn't meant to do.

to quote my man Al
Go Back To Programming & Development Topic List
Prev13456710Next
Add Reply New Topic New Poll