PDA

Click to See Complete Forum and Search --> : VBF extension


francisstokes
Apr 17th, 2006, 06:27 PM
private void btnGo_Click(object sender, System.EventArgs e)
{
tbxPass.Text = "";
Random rnd = new Random();

try
{
int no = Convert.ToInt32(nud.Text) + 1;

for (int i = 1; i < no; i++)
{
tbxPass.Text += chars[rnd.Next(0, 61)];
}
}
catch {}


}

si_the_geek
Apr 17th, 2006, 06:28 PM
Moved to the "Test" forum ;)

francisstokes
Apr 17th, 2006, 06:29 PM
.... but this is the CC forum...

si_the_geek
Apr 17th, 2006, 06:39 PM
No it isn't - look above the first post (or below the quick-reply box). ;)

Is there any reason that you want this in CC?

NoteMe
Apr 18th, 2006, 02:52 AM
Because the extension is so PRETTY...:D

si_the_geek
Apr 18th, 2006, 02:55 AM
It's so pretty that I had to go into the C# forum to let people know about it!!

NoteMe
Apr 18th, 2006, 05:31 AM
Thanks a lot...we have about 300 users on 6-7 different forums now.:D

Cander
Apr 18th, 2006, 09:26 AM
Thanks a lot...we have about 300 users on 6-7 different forums now.:D

We do? Wow. Maybe I will get back into working on it again. :blush:

NoteMe
Apr 18th, 2006, 03:47 PM
Nahh..not 100% yet....but not far away either. It is hard to say though. Since the only way I can messure it right now is to see how many hits we have on the .rdf file. And since by default Fx is checking for new versions of an extension every 24h. It can be calculated more or less. But then again, people can change this value up or down, and on an other hand it is not sure that people are using that machine every day. But I would guess we getting close to 300 users now.


It is easy for me these days to count boards though. Since we moved all the smilies to my server. It is just to check what pages I get hits, but not page views from. Then go to those pages and look for our smilies..:) But of course moste of these are probably VBF users taken the extension with them to other forums like codeguru, but then again. I guess people on other forums are are installing it too, since it has started to spread faster the last 2-3 months...

NoteMe
Apr 18th, 2006, 03:48 PM
Like here:
http://www.pagalguy.com/forum/touching-lives/14240-blanknoise-project-fight-against-sexual-6.html

si_the_geek
Apr 19th, 2006, 05:51 AM
ok... as I have your attention guys ;)

I have added a "code snippet" (actually it was "please mark this thread resolved"), but if I try to use it or edit it I get errors.. can I just remove it somehow?


(oh, and the drop-down list in the editor is only 2 pixels high!!)

NoteMe
Apr 19th, 2006, 07:40 AM
It was cander that made that stuff..:) It looks a bit different with different themes.

Are you root/admin on the computer you are using now? If not then I guess it is writing to a place that you are not allowed to.



Edit...or maybe I am wrong. Looks like Cander is testing on that:


function platformPath()
{


try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e)
{
alert("Permission to save file was denied.");
}

const DIR_SERVICE = new Components.Constructor("@mozilla.org/file/directory_service;1","nsIProperties");
try
{
path=(new DIR_SERVICE()).get("ProfD", Components.interfaces.nsIFile).path;
}
catch (e)
{
alert(e);
}

// findout if linux or windows to determine path
if (path.search(/\\/) != -1)
{
return "\\";
}
else
{

return "/";
}


}




I'll see if Cander can give you an answer first, if not, I'll digg into his code a bit deeper...


- ии -

si_the_geek
Apr 19th, 2006, 07:50 AM
Are you root/admin on the computer you are using now? Nope, I'm intentionally a "nobody"!

Oh, and I'm using WinXP Pro.

NoteMe
Apr 19th, 2006, 08:10 AM
Yes I know you are a nobody, but what right do you have on your computer... :p :p I really need some fresh air now. :)


Let see if Cander knows without looking at it what is wrong. If he doesn't, i'll see if I get time to find a WIndows XP machine around here later on tonight.



-ии -

Cander
Apr 19th, 2006, 08:51 AM
I really have no clue. It should write without any issues since it writes only to the current users profile directory.

si_the_geek
Apr 19th, 2006, 09:17 AM
It only happens for a certain one, which has a : in the name. :blush:

Looking in the profiles directory I can see that the bit before the colon is there as a file, but not surprisingly the rest of the filename isn't.


Time for me to remove it from "snippets.vbf", and re-add it with a legal file name!

Cander
Apr 19th, 2006, 09:42 AM
Ahh.That would do it.

Will have to do a check for illegal characters next time I get around to making updates

NoteMe
Apr 19th, 2006, 11:13 AM
We forgot to think this through before we started coding.

Todo list:
- Make code fool proof.
- Rewerite all code with this on our mind: "Our users is idiots"


:D::D:D:D:D:DD::D:D:D:D

Cander
Apr 19th, 2006, 11:40 AM
We forgot to think this through before we started coding.

Todo list:
- Make code fool proof.
- Rewerite all code with this on our mind: "Our users is idiots"


:D::D:D:D:D:DD::D:D:D:D

lol. I originally wrote this with VBF users in mind. And since they are developers I didn't think they could possibly do something stupid. :blush:

Just kiding guys. No love lost :wave:

si_the_geek
Apr 19th, 2006, 11:46 AM
:lol:

If I'd known before that it was a file per snippet I would have been ok... but as Note said, "Our users is idiots". :ehh:

NoteMe
Apr 20th, 2006, 02:48 AM
I give up...ARE, are are are. plural is always ARE..:D


"our users are idiots"...:D



- ии -