Wednesday, June 09, 2010

Get temporary folder on PC/MAC

How often do you need to extract files to temporary folder, process them and import back? I do this from time to time, hope you are as well :).
Let's say you have image attached to document and you would like to change it to 32x32 size (obviously you need to change width and height of image in case if it is to big) and attach back to document instead.
I would like to ask about place you usually use to export files. Yes, it is quite easy to extract files to "C:\", easy? right? but not correct, users for sure will not have right for creating files there. Of course I'm pretty sure 95% of you use Environ("Temp") and Environ("Tmp") to determine temporary folder so that's fine, that's I believe only one possible way.
but now question about MAC users, how we can determine their temporary folder? I always use hardcode (yea, shame on me :) ) with path \var\tmp and this approach works fine (at least till this day), but I still can't forget this hardcoded \var\tmp so if anybody know the right way please share it !
Update
here is great link that I was looking for (Thanks to Sasa). Actually main part we need from lss here

Declare Function w32_OSGetSystemTempDirectory Lib "nnotes" Alias "OSGetSystemTempDirectory" ( Byval S As String) As Integer
Declare Function mac_OSGetSystemTempDirectory Lib "NotesLib" Alias "OSGetSystemTempDirectory" ( Byval S As String) As Integer
Declare Function linux_OSGetSystemTempDirectory Lib "libnotes.so" Alias "OSGetSystemTempDirectory" ( Byval S As String) As Integer

Select Case session.Platform
Case "Linux"
s% = linux_OSGetSystemTempDirectory(d)
Case "Macintosh"
s% = mac_OSGetSystemTempDirectory(d)
Case "Windows/32"
s% = w32_OSGetSystemTempDirectory(d)
End Select

Friday, June 04, 2010

JS/CSS/HTML compressors do you use?

JS => http://closure-compiler.appspot.com/home
CSS =>http://developer.yahoo.com/yui/compressor/
HTML => I've never used such tools at all, so would be interested in your suggestions :)

Friday, May 28, 2010

Monday, May 17, 2010

google and keyword '[site:googleblog.blogspot.com]'

I did not know that :) we can easily run 'goggle's search' only one specific site, that's excellent :)
f.x. run this as search criteria 'site:googleblog.blogspot.com hello or monday'

as I say: better late than never