Fhernd

Permutations.cs

Jul 4th, 2016
1,225
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.67 KB | None | 0 0
  1. // Generates partial permutations for a given string:
  2. private HashSet<string> GeneratePartialPermutation(string word)
  3. {
  4.     return new HashSet<string>(Enumerable.Range(0, word.Length)
  5.         .Select(i => word.Remove(i, 1).Insert(0, word[i].ToString())));
  6. }
  7.  
  8. // Entry point for the LINQ recipe:
  9. void Main()
  10. {
  11.     // Stores all the permutations computed in HashSet data structure.
  12.     // It also generates the first partial permutations:
  13.     HashSet<string> perms = GeneratePartialPermutation("abcd");
  14.    
  15.     // Generates permutations by traversing all possible permutations of
  16.     // the given string -"abcd"-:
  17.     Enumerable.Range(0, 2)
  18.         .ToList()
  19.         .ForEach
  20.         (
  21.             c =>
  22.             {
  23.                 // Permutations in forward direction:
  24.                 Enumerable.Range(0, perms.Count())
  25.                 .ToList()
  26.                 .ForEach
  27.                 (
  28.                     i => GeneratePartialPermutation(
  29.                         perms.ElementAt(i))
  30.                         .ToList()
  31.                         .ForEach(p => perms.Add(p))
  32.                 );
  33.                
  34.                 // Permutations in reverse direction:
  35.                 Enumerable.Range(0, perms.Count())
  36.                 .ToList()
  37.                 .ForEach
  38.                 (
  39.                     i => GeneratePartialPermutation(new String
  40.                         (perms.ElementAt(i).ToCharArray()
  41.                             .Reverse().ToArray())
  42.                 )
  43.                 .ToList().ForEach(p => perms.Add(p)));
  44.             }
  45.         );
  46.        
  47.     // Displays all permutations:
  48.     perms.OrderBy(p => p).Dump("Permutations of 'abcd'");
  49. }
Advertisement
Comments
  • CroatianBoy2
    70 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without any verification from Swapzone — instant swap).
Add Comment
Please, Sign In to add comment