Quantcast

Jump to content


Photo

Want to release one program


  • Please log in to reply
18 replies to this topic

#1 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 19 November 2013 - 05:54 PM

Hello,

 

That program let you know what names of 4 letters are free to your pets, separated with all names found, or names with 2 or more vocals (no account details required), I want to give it at neocodex but I don't know how.

 

Someone can tell me who I have to give it?

 

When I release the program, you can have your pet with 4 letters easy.

 

Done.

You can download program here:
http://www.neocodex....ble-pet-finder/


Edited by Nadrak, 21 November 2013 - 02:12 PM.


#2 Strategist

Strategist
  • Sadmin

  • 10012 posts


Users Awards

Posted 19 November 2013 - 05:58 PM

Hey mate, feel free to post it here if you wish. Those that know how to, can do a check of it and let people know that it's ok/safe to download. Or alternatively, you can get one of the programmers here to have a look over the code by pm'ing it to them.

#3 Musician

Musician
  • 669 posts


Users Awards

Posted 19 November 2013 - 05:58 PM

Oooh, I don't know how you would go about doing it, but I AM looking forward to this program! ^_^



#4 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 19 November 2013 - 05:59 PM

Hey mate, feel free to post it here if you wish. Those that know how to, can do a check of it and let people know that it's ok/safe to download. Or alternatively, you can get one of the programmers here to have a look over the code by pm'ing it to them.

If you want, I can give you my code and you give it to your programmers, but i prefer don't let it public...

If it's possible, you can put it into your neocodex progam manager, not a problem for me.

 

Post edited, added link to .exe and virustotal analysis.


Edited by Nadrak, 19 November 2013 - 06:03 PM.


#5 Zoma

Zoma
  • 89 posts


Users Awards

Posted 19 November 2013 - 06:12 PM

I aprobe this program used it weeks ago (since I'm his rl friend), there is no virus and works fine. 

 

The only bad thing is than as you know the names are limited so I hope you guys have lucky and catch a nice one!

 

(yay my english sucks! so sorry XD)



#6 Strategist

Strategist
  • Sadmin

  • 10012 posts


Users Awards

Posted 19 November 2013 - 08:53 PM

Removed the links as we would like to have a look over the program first before you release it. Anyone can say it has no malicious code, but we need to confirm this, just to be safe. (Not saying that it is a malicious program, just being cautious ;) )



#7 Fikri

Fikri
  • submissive


  • 4433 posts


Users Awards

Posted 20 November 2013 - 03:38 AM

ah, i'm sure this program will be a hit among PC people here. looking forward for the launch. :)



#8 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 20 November 2013 - 04:50 AM

ah, i'm sure this program will be a hit among PC people here. looking forward for the launch. :)

 

I want to put program on Neocodex program manager, actually Neocodex programmers are monitoring my code ^.^



#9 Waser Lave

Waser Lave

  • 25516 posts


Users Awards

Posted 20 November 2013 - 04:59 AM

I want to put program on Neocodex program manager, actually Neocodex programmers are monitoring my code ^.^

 

It won't be able to go in the Program Manager because it uses a completely different language. I believe Valorous' Neopets Suite is programmed in C# though so he might be able to put it in there if you speak to him.



#10 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 20 November 2013 - 06:51 PM

It won't be able to go in the Program Manager because it uses a completely different language. I believe Valorous' Neopets Suite is programmed in C# though so he might be able to put it in there if you speak to him.

 

Waiting your revision to make public my program ^.^

 

Done!

You can download my program here:
http://www.neocodex....ble-pet-finder/


Edited by Nadrak, 21 November 2013 - 02:11 PM.


#11 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 22 November 2013 - 03:49 AM

It's safe. Doesn't require any authentication & only web requests going out are directly to neopets.

 

 

 

     HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.neopets.c...kup.phtml?pet=" + this.currentName);

 

There appears to be a 1 second delay between requests, which I guess is good enough. 60 requests a minute probably isn't frequent enough to cause any major problems.

 

You may want to consider implementing a more randomised waiting time, perhaps user configurable.



#12 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 22 November 2013 - 04:02 PM

There appears to be a 1 second delay between requests, which I guess is good enough. 60 requests a minute probably isn't frequent enough to cause any major problems.

 

You may want to consider implementing a more randomised waiting time, perhaps user configurable.

First of all, delete that code line.
Second, when make request, read it and look if name are available, need more than 1 second, is not a problem at the moment, but ok, when I release 5L finder (sunday), I can put request time configurable by user



#13 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 23 November 2013 - 03:29 AM

First of all, delete that code line.
Second, when make request, read it and look if name are available, need more than 1 second, is not a problem at the moment, but ok, when I release 5L finder (sunday), I can put request time configurable by user

 

No...

 

And cool, that sounds good.

 

Why not make it so that the user can provide the number of letters they'd like to search for? Realistically that wouldn't make the program any more complex.



#14 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 23 November 2013 - 03:46 AM

Find names of more than 5 characters may take several days to complete, so I guess it's not useful

#15 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 23 November 2013 - 04:47 AM

Find names of more than 5 characters may take several days to complete, so I guess it's not useful

 

The problem here is actually a very common one - finding all permutations (orderings) of a given collection.

There are a number of implementations in C# - I've modified one I found to make it a little simpler for you to understand, see below:

void Main()
{
	var numberOfLetterPermutations = 4;
	
	var providedLetters = new [] { 'y', 'j', 'k', 'a' };
	
	var enumerable = GetCombinations(providedLetters, 4);
		
	var allPossiblePermutations = enumerable.ToList();
}

public IEnumerable<IEnumerable<char>>  GetCombinations(IEnumerable<char> list, int length)
{
    if (length == 1) 
	{
		return list.Select(a => new char[] { a });
	}

    return GetCombinations(list, length - 1)
        .SelectMany(t => list, (firstChar, secondChar) => firstChar.Concat(new char[] { secondChar }));
}


As you can see from the usage it'll generate all of the possible permutations based on a given set of letters.

 

 

You should now be able to iterate over the returned collection to then make your web requests to neopets and determine whether the pet name is available:

	var allPossiblePermutations = enumerable.ToList();
	
	foreach(var permutation in allPossiblePermutations)
	{
		var isAvailable = DetermineAvailability(permutation);
		
		// if it's available, add to a list of available options
		// etc etc
	}

public bool DetermineAvailability(string permutation)
{
	// make request to neopets & parse response
	return true;
}


#16 Waser Lave

Waser Lave

  • 25516 posts


Users Awards

Posted 23 November 2013 - 04:49 AM

 

The problem here is actually a very common one - finding all permutations (orderings) of a given collection.

There are a number of implementations in C# - I've modified one I found to make it a little simpler for you to understand, see below:

void Main()
{
	var numberOfLetterPermutations = 4;
	
	var providedLetters = new [] { 'y', 'j', 'k', 'a' };
	
	var enumerable = GetCombinations(providedLetters, 4);
		
	var allPossiblePermutations = enumerable.ToList();
}

public IEnumerable<IEnumerable<char>>  GetCombinations(IEnumerable<char> list, int length)
{
    if (length == 1) 
	{
		return list.Select(a => new char[] { a });
	}

    return GetCombinations(list, length - 1)
        .SelectMany(t => list, (firstChar, secondChar) => firstChar.Concat(new char[] { secondChar }));
}


As you can see from the usage it'll generate all of the possible permutations based on a given set of letters.

 

 

You should now be able to iterate over the returned collection to then make your web requests to neopets and determine whether the pet name is available:

	var allPossiblePermutations = enumerable.ToList();
	
	foreach(var permutation in allPossiblePermutations)
	{
		var isAvailable = DetermineAvailability(permutation);
		
		// if it's available, add to a list of available options
		// etc etc
	}

public bool DetermineAvailability(string permutation)
{
	// make request to neopets & parse response
	return true;
}

 

It's not the creation of the list which takes the time though, it's making all of the requests to the website.



#17 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 23 November 2013 - 04:58 AM

It's not the creation of the list which takes the time though, it's making all of the requests to the website.

 

Yep. Wasn't a question of performance or timing, more of a pointer as the original code isn't using a very clean way of finding out generating these.

 

Realistically you could actually generate these lists as a one-time thing and just use the app to iterate through and check if the name is available... but this was meant as more of a learning exercise.



#18 Nadrak

Nadrak
  • 101 posts


Users Awards

Posted 23 November 2013 - 03:20 PM

Yep. Wasn't a question of performance or timing, more of a pointer as the original code isn't using a very clean way of finding out generating these.

 

Realistically you could actually generate these lists as a one-time thing and just use the app to iterate through and check if the name is available... but this was meant as more of a learning exercise.

The total time it takes to make your list or mine, differs by milliseconds.

What takes 1 second or more for each iteration is the query to the web and verify is name exist or not, the list has nothing to do with the time it takes for finish all searches (in this case).

PS:

That program was created years ago, so, at this moment, I can create more "efficient and clear" program but it's not existential problem :p


Edited by Nadrak, 23 November 2013 - 03:23 PM.


#19 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 23 November 2013 - 03:45 PM

The total time it takes to make your list or mine, differs by milliseconds.

What takes 1 second or more for each iteration is the query to the web and verify is name exist or not, the list has nothing to do with the time it takes for finish all searches (in this case).

PS:

That program was created years ago, so, at this moment, I can create more "efficient and clear" program but it's not existential problem :p

 

Haha... OK buddy.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users