Ok So I lied about what the first one would be, but since I'm working with some code that's useing the topic I'm talking about I have examples.
Ok there's no Trianry operator in Classic ASP. For those of you who don't know what I'm talking about it's this kind of syntax that you can find in most bracketed languages. The operator uses two charcters and looks like this " ?: ". It's used like this:
//JavaScript
var sDude = new String("Anakin");
var sMessage = new String();
sMessage = (sDude == "Anakin")?"Jedi":"Sith";
alert(sMessage);
//alerts "Jedi"
But On the server VBScript dosen't have anyoperators like that which I find are quite a line saver in other languages. Trianry has been found in other places VBScript has been used like VBA (Visual Basic for Applications), and when it is supported it look like a function/language construct called IIf.
A work around for this that I've found usefull was to define a function for the trinary operation, or inline if, or immeidate if as it's been called. Like so
'VBScript
'RunAt=Server
Function IIf(varTest, varTrue, varFalse)
If varTest Then IIf = varTrue Else IIf = varFalse
End Function
But be wary children, you must declare each parameter or you'll get an error.
I'll try to only post things that I think are hard to find answers and things that I at least have a solid work around for. Otherwise happy coding.
--muja
Enknot's Journal
My Podcast Link
03/28/2006 19:39 #22268
Trinary For Classic ASPCategory: classic asp
03/28/2006 19:18 #22267
Classic ASPCategory: classic asp
I program in Classic ASP at work, though I'm moving to .NET soon.
Still there are a lot of programmers that program in Classic ASP, and don't have an option to change that could use a resource like I hope this journal posting will become.
I'm going to keep updating this journal everytime I find something wonky with Classic ASP that I've figured out.
Maybe I'll start a profile called William Gates where I can post these things. Ooh, or maybe I'll just start a category called Classic ASP (enknot's kinda slow sometimes kids, you're going to have to forgive him.)
First one's first is the Data Dictionary .Add Bug...yeah.
Still there are a lot of programmers that program in Classic ASP, and don't have an option to change that could use a resource like I hope this journal posting will become.
I'm going to keep updating this journal everytime I find something wonky with Classic ASP that I've figured out.
Maybe I'll start a profile called William Gates where I can post these things. Ooh, or maybe I'll just start a category called Classic ASP (enknot's kinda slow sometimes kids, you're going to have to forgive him.)
First one's first is the Data Dictionary .Add Bug...yeah.
03/07/2006 21:08 #22266
Nails...Nine of em'Category: unnerd
NIN was the most professional band I've ever seen in my entire life. I've herad about Trent's relentlessly high expectations from his staff, but it really really really paid off.
I've seen shows in gyms and auditoriums before, but nothing that has ever sounded that good....
My friend Andy Blake (a very very good local photographer) took some really close pics of the hate machine him self, and if he let's me I'll post some to this journal.
Yes, today was quite awesome in many ways, but I have the worst work guilt. I'm like married to that job.
I figure I'll just go in a little early and catch up what I missed today...
later peeps
I've seen shows in gyms and auditoriums before, but nothing that has ever sounded that good....
My friend Andy Blake (a very very good local photographer) took some really close pics of the hate machine him self, and if he let's me I'll post some to this journal.
Yes, today was quite awesome in many ways, but I have the worst work guilt. I'm like married to that job.
I figure I'll just go in a little early and catch up what I missed today...
later peeps
03/07/2006 08:45 #22265
HookeyCategory: unnerd
Andy called me last night and asked if I wanted to go to Nine Inch Nails today for free.
Of course I said yes foolish! We have really close to the front tickets and we might be getting some floor tickets from a scalper.
He has a photo pass so he'll get floor no problem. If ever there was a reason to have a hobby it is to take sweet pictures ( (e:mat) ) so that you can get free tickets to sweet shows.
I never played hoOKy in school....hmm, ok once in like 12 years of schooling. I was such a nerd...ssssigh. This isn't exactly hooky (I have a few days to call off with), but it sure feels fun
:P
I'll try and get some pics of the ReZonator and put em up here for ya'll to see. Hey if anyone want to come with send and email and we'll see what we can do.
Of course I said yes foolish! We have really close to the front tickets and we might be getting some floor tickets from a scalper.
He has a photo pass so he'll get floor no problem. If ever there was a reason to have a hobby it is to take sweet pictures ( (e:mat) ) so that you can get free tickets to sweet shows.
I never played hoOKy in school....hmm, ok once in like 12 years of schooling. I was such a nerd...ssssigh. This isn't exactly hooky (I have a few days to call off with), but it sure feels fun
:P
I'll try and get some pics of the ReZonator and put em up here for ya'll to see. Hey if anyone want to come with send and email and we'll see what we can do.
jenks - 03/07/06 11:10
Funny that you mention NIN, since your userpic has always made me think of them. Have fun! I met Trent once, briefly. He dated a girl a year behind me in med school, and she brought him to a formal once. Odd...
Funny that you mention NIN, since your userpic has always made me think of them. Have fun! I met Trent once, briefly. He dated a girl a year behind me in med school, and she brought him to a formal once. Odd...
ladycroft - 03/07/06 10:12
how did i miss that NIN was coming to b-lo????? that SUCKS it!
how did i miss that NIN was coming to b-lo????? that SUCKS it!
dragonfire1024 - 03/07/06 09:25
A photo pass...sweet! I just got my Press Pass myself. I cannot wait to go to a concert...but if I do, I will have to report on it :)
A photo pass...sweet! I just got my Press Pass myself. I cannot wait to go to a concert...but if I do, I will have to report on it :)
03/06/2006 08:45 #22264
The Hacker's Karma CurseCategory: nerd
So any time there's some weird computer behavior at work (e:paul) blames it on "the hacker". It's typically really funny, but I guess you'd only find that funny if you were a huge fat nerd like I am. Ahhhhh, snort.
Anyway I have this network at home that I'm teaching my self networky stuff with at my own pace, and I've come into a bit of anomaly. An anomaly that I'm going to blame on bad karma, and not the sweet Radiohead kind either.
Now, I'm not the most honest person in the world. I've done things on the slide from time to time in my life. I'd like to think that anyone who'll tell you that they have never done anything dishonest is probably lying to you...to get you in bed, or to buy a lot of magazines you'll never read. Yeah. And I don't think a little wi-fi theft is outside the realms of reasonabitlty. I figure your broadcast it, you want people to pick it up, right? Well my neighbor broadcasts, and though he wanted to have me (and the other house tenants) pitch in to use his network, he also wanted to dictate what we could do on said network. So naturally, I said bully to that and got my own connection. But then I got my lappy and discovered the joys of bedside web browsing at the expense of my neighborly neighbor without paying a cent. (Insert sheepish grin) (Bad Karma: 1pt, Good Karma: Ziltch).
Ok, I'm going to stack the logs upon which I will burn now.
Jenny gave me a wireless router when last I visited her. I bought an antenna from new egg to broaden the signal, but they didn't work together so I exchanged them, 60 bucks, and a lil white lie at CompUSA for a new SUPASWEET Router and now the anomaly!(Incase you were still keeping count; Bad Karma: 3pts, Good Karma: Goose Egg).
My whole house (3 aptartments) shares one internet connection and thats why I'm using a router at all. It's nice to share files and an internet bill and not have to worry about big brother making sure all the porn you look at is nice healty clean porn. I've even secured our network so that we can make private transactions wirelessly and so that we're the only one's using the net work (Bad Karma: 3pts, Good Karma: one measly lil point), but there's something fishy going on.
I've uploaded a snapshot of the DHPC table from my router and yes there are more computers on it than I currently think should be on it, but this could just be a lack of experince or something, but it's pretty clear that 1 Muja Compy, 1 Downstairs Compy, 1 Upstairs compy, and 1 Enknot Lappy dose not equal 7 connections. Alas, I will learn, or maybe catch the hacker in the act...
Anyway I have this network at home that I'm teaching my self networky stuff with at my own pace, and I've come into a bit of anomaly. An anomaly that I'm going to blame on bad karma, and not the sweet Radiohead kind either.
Now, I'm not the most honest person in the world. I've done things on the slide from time to time in my life. I'd like to think that anyone who'll tell you that they have never done anything dishonest is probably lying to you...to get you in bed, or to buy a lot of magazines you'll never read. Yeah. And I don't think a little wi-fi theft is outside the realms of reasonabitlty. I figure your broadcast it, you want people to pick it up, right? Well my neighbor broadcasts, and though he wanted to have me (and the other house tenants) pitch in to use his network, he also wanted to dictate what we could do on said network. So naturally, I said bully to that and got my own connection. But then I got my lappy and discovered the joys of bedside web browsing at the expense of my neighborly neighbor without paying a cent. (Insert sheepish grin) (Bad Karma: 1pt, Good Karma: Ziltch).
Ok, I'm going to stack the logs upon which I will burn now.
Jenny gave me a wireless router when last I visited her. I bought an antenna from new egg to broaden the signal, but they didn't work together so I exchanged them, 60 bucks, and a lil white lie at CompUSA for a new SUPASWEET Router and now the anomaly!(Incase you were still keeping count; Bad Karma: 3pts, Good Karma: Goose Egg).
My whole house (3 aptartments) shares one internet connection and thats why I'm using a router at all. It's nice to share files and an internet bill and not have to worry about big brother making sure all the porn you look at is nice healty clean porn. I've even secured our network so that we can make private transactions wirelessly and so that we're the only one's using the net work (Bad Karma: 3pts, Good Karma: one measly lil point), but there's something fishy going on.
I've uploaded a snapshot of the DHPC table from my router and yes there are more computers on it than I currently think should be on it, but this could just be a lack of experince or something, but it's pretty clear that 1 Muja Compy, 1 Downstairs Compy, 1 Upstairs compy, and 1 Enknot Lappy dose not equal 7 connections. Alas, I will learn, or maybe catch the hacker in the act...
scott - 03/14/06 16:21
It's me. I'm sharing your WiFi.
If you want to limit connections, MAC address filtering is the way to go. The other option is to disable wireless connections. That works well, too.
If you're really worried, there are people working on VPN for wireless... like this dude.. :::link:::
Dunno how it works, though.
It's me. I'm sharing your WiFi.
If you want to limit connections, MAC address filtering is the way to go. The other option is to disable wireless connections. That works well, too.
If you're really worried, there are people working on VPN for wireless... like this dude.. :::link:::
Dunno how it works, though.
ajay - 03/06/06 11:21
If you're using WEP, it's useless.
If you're using WPA, it is somewhat better.
Have you tried hardwiring the MAC addresses into the router? What router is it? If it's a Linksys one, you might be able to get a 3rd party image for it and install it youself, giving you more control over it.
Use some packet capturing software to capture whatever those other computers are doing. Chances are the are sharing stuff; it would be sweet if they're sharing their printer. If so, print out a "DO NOT USE MY WIFI" on their printer. ;-)
If you're using WEP, it's useless.
If you're using WPA, it is somewhat better.
Have you tried hardwiring the MAC addresses into the router? What router is it? If it's a Linksys one, you might be able to get a 3rd party image for it and install it youself, giving you more control over it.
Use some packet capturing software to capture whatever those other computers are doing. Chances are the are sharing stuff; it would be sweet if they're sharing their printer. If so, print out a "DO NOT USE MY WIFI" on their printer. ;-)
paul - 03/06/06 09:14
Wireless is never secure ever. In fact I just leave ours wide open because I find no matter how I secure, I can crack it.
I just monitor the connections all the time. What encryption are you using?
Wireless is never secure ever. In fact I just leave ours wide open because I find no matter how I secure, I can crack it.
I just monitor the connections all the time. What encryption are you using?
Switch over to php or perl... come to the light... come to the light!