Reputation: 60
Excellent
- Group:
- Members
- Active Posts:
- 1099 (1.18 per day)
- Most Active In:
- General Discussion (240 posts)
- Joined:
- 05-November 10
- Profile Views:
- 5361
- Last Active:
May 20 2013 12:58 PM- Currently:
- Offline
My Information
- Member Title:
- Bringing XKCD to a post near you
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
Male
- Location:
- London
- Expertise:
-
HTML
CSS
PHP
Javascript
Contact Information
- E-mail:
- Private
- Website URL:
-
http://www.filebox.me
- Skype:
-
alexdavey0
Posts I've Made
-
In Topic: TV Show cipher
13 May 2013 - 01:33 PM
The note in the margin shows the substitutions for the first three letters, hence it is a substitution cipher. But you realise that most hacking/cryptography/security/technology isn't real in movies, let alone in tv shows? -
In Topic: [Javascript] Someone familiar with Facebook's Open graph
26 April 2013 - 05:35 PM
Nice idea. You could make it more robust by using a naive Bayes Classifier instead of simply searching for words (JS library). And you can use it to infer more than just moods, although I don't know at what point it turns from a funny app into a creepy information gathering one
-
In Topic: JavaScript Performance Tips
09 April 2013 - 01:35 PM
Quote
If I would tell them that spending 10 minutes reading this could save more than 50 new upgrades with simple code improvements that account for a 50x+ performance increase, do you think they would listen?
Most (if not all) of those optimisations fall prey to the false logic that a 50x micro optimisation leads to a 50x performance improvement across the application.
Apart from the first one, all of the optimisations have speeds in the order of microseconds or nanoseconds for the "slow version". Unless they are in some double for loop, the difference will be negligible compared to slower operations such as DOM access (for example: innerHTML is several orders of magnitude slower). -
In Topic: Read contents of image in C
01 April 2013 - 12:11 PM
int i; for (i = 0; i < fileSize; i++) { printf("%c", contents[i]); }
instead of
printf("%s", contents); -
In Topic: Read contents of image in C
01 April 2013 - 12:04 PM
It's a buffer, so you need to loop over it and get rid of the\n
inprintf
. (Otherwise it only returns the first byte). Also insize_t size=fread(contents,fileSize,1,stream);
, fileSize and 1 should technically be the other way round, since the second argument is the size of each element, and the third argument the number of elements to read.






Cartoon Clouds
Mountains
Sunrise
Clouds
Green Clouds
None
Find My Content
Display name history


Help
Comments
alexdavey has no profile comments yet. Why not say hello?