xdrop / jrand Goto Github PK
View Code? Open in Web Editor NEWA Java library to generate random data for all sorts of things. Java random data faker
License: Apache License 2.0
A Java library to generate random data for all sorts of things. Java random data faker
License: Apache License 2.0
tried to use this from maven.
it doesn't work, the sub-modules are not available on maven
Adding this project as a dependency in a Gradle project with compile 'me.xdrop:jrand:0.2.5-alpha'
does not work!.
The following errors show up when invoking gradle dependencies
:
compile - Dependencies for source set 'main' (deprecated, use 'implementation' instead).
\--- me.xdrop:jrand:0.2.5-alpha
+--- me.xdrop:jrand-core:0.2.5-alpha FAILED
+--- me.xdrop:jrand-test:0.2.5-alpha FAILED
\--- me.xdrop:jrand-annotation-processor:0.2.5-alpha FAILED
Hi . I would like to ask is there a way to generate a random natural number which is a multiple of a specific factor n?
For example:
int factor = 3;
NaturalGenerator naturalGenerator = JRand.natural();
naturalGenerator.min(0);
naturalGenerator.max(999);
//do something with factor
int randomMultiple = naturalGenerator.gen();
Im having issues with using the string generator multiple times. Somehow if i set some "properties"/use some methods for the first string it works as it should.... but if try generating a second string afterwards, it uses the "properties"/methods for the new string and merges them with the newly set generator "properies"
Here an Example for that:
public static void main(String[] args) {
StringGenerator StringGenerator = JRand.string();
String String1 = StringGenerator.alpha().casing("upper").length(3).gen();
String String2 = StringGenerator.symbols().length(3).gen();
System.out.print("String 1: " + String1 + " String 2: " + String2);
}
This gives me this: String 1: THS String 2: (PL
I found a Workaround for this by adding StringGenerator = JRand.string();
between the lines where the strings are generated, but ist there an easyer way for that like StringGenerator.flush()
or is that just an issue with that Library? Or even better, so that .gen()
empties out the pool every time it's used.
I like this, but would like to generate sentences with real words.
would it be possible?
Hi,
this project on maven central can not be downloaded with 'sbt' since its 'compile' dependencies
are not reachable (they can not be located on maven central).
Tried with version 0.2.5-alpha
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.