Uncategorized

scanf_s security enhancements

My friend Adrian points me to scanf_s that is not usable just by simple replacing scanf( src, “%s”, dest) with scanf_s but you also have to add an additional parameter for every string or character read, specifying the buffer size. For example, if dest was char dest[10] you’d have to write scanf_s( src, “%s”, dest, 10), otherwise an access violation will occur.

infoarena blog

Infoarena, the only (?) site in Romania about the CS contests, algorithms etc, has a blog.

wordpress.com http headers

ROFL – here are the http headers for any blog hosted on wordpress.com:

X-hacker: If you’re reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.

X-Pingback: http://xxxxx.wordpress.com/xmlrpc.php

Vary: Cookie

…. etc

Early Jaiku source code

Mika Raento from Jaiku shares the source code of ContextPhone, the product that was the basis for the successful Jaiku product. It’s full of gems and, if you are coding for Symbian, go check it out.

Vista multiple file permissions

I have no idea why but in Vista it’s not possible anymore to select lots of files and change their access permissions (the Security tab does not appear). The only way to do that is using the icacls command-line utility, for example run this to grant full access for Everyone for all the files in the current folder:

icacls *.* /grant Everyone:(F)

UMA is the next buzzword …

… from Nokia, and 6301 is its first mobile phone to support it. I’m still wondering how many operators will support this considering the wlan-based free calls – a business model may be installing hotspots in crowded areas and charging for voip (less than for gsm of course) ?

Remote device access

Dragos points me to mobilecomplete, well, Nokia has something similar: RDA.

Connection timeout in J2ME

Bluetooth async connections in J2ME can theoretically be implemented by using another thread to timeout blocking operations … except, just a second, how can you stop Connector.open ? Let’s leave that to the server where I am trying to authenticate – oh wait, that doesn’t timeout neither ?

C#/.NET generic set

Until the official HashSet becomes available in .NET 3.5, here’s a simple generic class that does the exact same thing – get rid now of that Dictionary variables! Actually what pissed me off most with Dictionary isn’t that dummy value parameter but the fact that Add throws an exception if the key was already present.

Vista Minesweeper with flowers

Isn’t it sweeet ?