Joined
Jul 31, 2008

# Activity Stream

Firstmate commented on Firstmate's Thread  -  May 31, 2012
Firstmate   -  May 31, 2012

@Hawkee Is there anyway to 'unfollow' a snippet/script? I often get notifications from snippets I had made a comment over many months ago.

Firstmate commented on Hawkee's Thread  -  May 26, 2012
Firstmate commented on lnz013's Thread  -  May 22, 2012
Firstmate commented on gooshie's Thread  -  May 21, 2012
Firstmate commented on a Page, BaseConverter  -  May 16, 2012

You should theoretically allow bases beyond a radix of 16. I see your switch only goes to F/f, when it should go to Z/z. To make it easier on yourself, check whether it's a letter and uppercase and convert to lowercase if so. Then do the standard equation you are using to convert it to it's decimal representation.

My two cents.

Firstmate commented on Sorasyn's Thread  -  May 10, 2012
Firstmate commented on Hawkee's Thread  -  May 05, 2012
Firstmate commented on a Page, dynamic multidimensional arrays Example  -  May 03, 2012

Consider it? If it's a matter of performance (and I'm not expert on the matter), in your snippet you're iterating so much more than necessary. Consider your 2x3x4 example. Mine would iterate (234) or 24 times. In your case, you loop 2 + (23) + (23*4) or 32 times. And these are just small dimensions. Again, I'm not too knowledgeable but surely you can see the optimization in this.

Firstmate commented on a Page, AutoMagic URL Shorten-er™ (using goo.gl)  -  May 02, 2012

This is where I remember seeing his script a long time ago.
\$getsource: http://forum.swiftirc.net/viewtopic.php?f=74&t=24161

Nice script by the way.

Firstmate commented on a Page, dynamic multidimensional arrays Example  -  May 02, 2012

I'm not sure if this was done more out of demonstrating the code, but why not take:

``````    double ***ptr3;
ptr3 = new double**[2];
for( int i = 0 ; i < 2 ; i++)
{
ptr3[i] = new  double*[3];
}
for( int i = 0 ; i < 2 ; i++)
{
for( int j = 0 ; j < 3 ; j++)
{
ptr3[i][j] = new  double[4];
}
}

for( int i = 0 ; i < 2 ; i++)
{
for( int j = 0 ; j < 3 ; j++)
{
for( int k = 0 ; k < 4 ; k++)
{
ptr3[i][j][k] = ( i * 3 + j ) * 4.1 + k * 0.1;
}
}
}
``````

And make it:

``````    double ***ptr3;
ptr3 = new double**[2];
for( int i = 0 ; i < 2 ; i++)
{
ptr3[i] = new  double*[3];
for( int j = 0 ; j < 3 ; j++)
{
ptr3[i][j] = new  double[4];
for( int k = 0 ; k < 4 ; k++)
{
ptr3[i][j][k] = ( i * 3 + j ) * 4.1 + k * 0.1;
}
}
}
``````
Firstmate commented on Hawkee's Thread  -  Apr 08, 2012
Firstmate commented on Hawkee's Thread  -  Apr 04, 2012

I'm pretty sure this is a rip (apologies if not). I've had this little snippet in my remotes that I got from someone for a long time:

``````alias np {
if (!\$com(itunes)) { .comopen itunes iTunes.Application }
if (\$com(CurrentTrack)) { .comclose CurrentTrack }
noop \$com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
noop \$com(CurrentTrack,Artist,3)
var %artist \$com(CurrentTrack).result
noop \$com(CurrentTrack,Time,3)
var %time \$com(CurrentTrack).result
noop \$com(CurrentTrack,Name,3)
var %name \$com(CurrentTrack).result
noop \$com(CurrentTrack,BitRate,3)
var %bitrate \$com(CurrentTrack).result
me Now Playing: Artist: %artist Track: %name Time: %time Bitrate: %bitrate
.comclose CurrentTrack
}
``````
Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 28, 2011

He means like %test hello, \$var(%test hello)

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 28, 2011

@WorldDMT: Instead of looking at the examples, if you look at the snippet, you'll see he loops around \$0.

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 27, 2011

Yours is not...The OPs allows for any number of arguments, i.e. \$vget(blah, test, foo, fah, words,46) Like I mentioned in my first post. Try your script with a variable of that nature and you get: "%blah.test is not set!"

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 27, 2011

Well, either way, just like yours it wasn't fully tested. I just wanted to indicate your example was different the OP's snippet.

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 27, 2011

No idea. Not on my windows puter atm, but I'm sure I had a reason...I just can't remember it.

When does it not work? I didn't test it fully either.

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 27, 2011

Woops, it should be checking if \$(\$+(\$,\$0),2) is 0. Nice catch.

Firstmate commented on a Page, Variable reader (\$vget)  -  Dec 26, 2011

Well his is organized so that you can supply any number of parameters, i.e. \$vget(blah, test, foo, fah, words,46).
However, I agree in that a loop isn't necessary. Here was my take on it:

``````alias vget {
tokenize 32 \$(\$1-,2)
var %d \$iif(\$(\$+(\$,\$0),2) != 0,\$v1)
var %e \$(\$+(%,\$replace(\$(\$iif(%d,\$+(\$,1-,\$calc(\$0 -1)),\$+(\$,1-,\$0)),2), \$chr(32), \$chr(%d))),2)
if (%e) return %e
else return Variable not set.
}
``````

Though as you mentioned, you made yours for readability :V

Firstmate commented on a Page, Sticky Note Custom Window  -  Dec 24, 2011

I would say no to using the Insert key, and stick to the 'i' Key, because Insert does not imply entering some edit mode, but rather the type of insertion (overwrite versus overtype) when you type.

Firstmate commented on a Page, Digital Clock  -  Dec 24, 2011

Well, you can always download a font that matches it. Get the bg color of the text (essentially drawing 88:88:88 88) and draw over that.

Firstmate commented on a Page, Digital Clock  -  Dec 24, 2011

I like your implementation as well, but in mine you can configure the format how you want. That's why the window width is not set statically.

Firstmate commented on a Page, Digital Clock  -  Dec 23, 2011

Here was my take on this:

``````alias digTimeFormat return ddd/HH:nn:ss TT
alias digTimeFontSize return 10
alias timebar {
if (!\$isdir(digTime)) mkdir digTime
if (\$toolbar(digTime)) { echo -s Toolbar already loaded | halt }
window -hp +d @_digTimeWin -1 -1 \$calc(\$width(\$asctime(\$ctime,\$digTimeFormat), Tahoma, \$digTimeFontSize) + 10) \$calc(\$height(\$asctime(\$ctime,\$digTimeFormat), Tahoma, digTimeFontSize))
.timerDigTime 0 1 updateDigTimeWin Digital Time
}
alias -l updateDigTimeWin {
clear @_digTimeWin
drawText -r @_digTimeWin \$rgb(0,204,0) Tahoma \$digTimeFontSize 3 3 \$asctime(\$ctime, \$digTimeFormat)
updateDigTimeToolbar
}
alias -l updateDigTimeToolBar {
drawSave @_digTimeWin digTime\digTime.jpg
if (\$toolbar(digTime)) toolbar -p digTime "digTime\digTime.jpg"
else toolbar -a digTime \$qt(\$1-) "digTime\digTime.jpg"
}
alias timeBarOff {
toolbar -d digTime
window -c @_digTimeWin
.timerDigTime off
}
``````
Firstmate commented on a Page, Sticky Note Custom Window  -  Dec 23, 2011

I think a good suggestion would be for other notes to be loaded in a side-listbox.

Firstmate commented on a Page, Sticky Note Custom Window  -  Dec 21, 2011

You know when napa comments on the compression, there's something to note.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.