Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

random

RNGCryptoServiceProvider – Random Number Review

September 1, 2022 by Magenaut

While looking for best attempts at generating truly random numbers, I stumbled upon this code example.

Categories ASP.NET, Q&A Tags .net, asp.net, c#, random, security Leave a comment

How to generate a random 10 digit number in C#?

August 29, 2022 by Magenaut

I’m using C# and I need to generate a random 10 digit number. So far, I’ve only had luck finding examples indicating min maximum value. How would i go about generating a random number that is 10 digits, which can begin with 0, (initially, I was hoping for random.Next(1000000000,9999999999) but I doubt this is what I want).

Categories ASP.NET, Q&A Tags .net, asp.net, c#, random Leave a comment

How to generate random unique 16 digit number in asp.net without collision

August 26, 2022 by Magenaut

how can i generate 16 digit unique random numbers without any repetition in c# asp.net, as i have read the concept of GUID which generate characters along with numbers but i don’t want characters

Categories ASP.NET, Q&A Tags asp.net, c#-4.0, guid, random Leave a comment

How can I randomly select an item from a list?

August 22, 2022 by Magenaut

Assume I have the following list:

Categories Python, Q&A Tags list, python, random Leave a comment

Shuffling a list of objects

August 22, 2022 by Magenaut

I have a list of objects and I want to shuffle them. I thought I could use the random.shuffle method, but this seems to fail when the list is of objects. Is there a method for shuffling objects or another way around this?

Categories Python, Q&A Tags list, python, random, shuffle Leave a comment

Random string generation with upper case letters and digits

August 21, 2022 by Magenaut

I want to generate a string of size N.

Categories Python, Q&A Tags python, random, string Leave a comment

How do I create a list of random numbers without duplicates?

August 21, 2022 by Magenaut

I tried using random.randint(0, 100), but some numbers were the same. Is there a method/module to create a list unique random numbers?

Categories Python, Q&A Tags python, random Leave a comment

Generate random integers between 0 and 9

August 21, 2022 by Magenaut

How can I generate random integers between 0 and 9 (inclusive) in Python?

Categories Python, Q&A Tags integer, python, random Leave a comment

Generate random numbers with a given (numerical) distribution

August 20, 2022 by Magenaut

I have a file with some probabilities for different values e.g.:

Categories Python, Q&A Tags module, python, random Leave a comment

Generate ‘n’ unique random numbers within a range

August 20, 2022 by Magenaut

I know how to generate a random number within a range in Python. random.randint(numLow, numHigh) And I know I can put this in a loop to generate n amount of these numbers for x in range (0, n): listOfNumbers.append(random.randint(numLow, numHigh)) However, I need to make sure each number in that list is unique. Other than … Read more

Categories Python, Q&A Tags python, random, unique Leave a comment
Older posts
Page1 Page2 … Page6 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress