![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
au.com.anthonybruno:SdGen
Advanced tools
A random data generator to produce realistic files for multiple file types (e.g. csv, log, json)
A random data generator to produce realistic data files for multiple file types (e.g. csv, log, json)
If you're using Maven, just add the following to your pom.xml
<dependency>
<groupId>au.com.anthonybruno</groupId>
<artifactId>SdGen</artifactId>
<version>0.2.0</version>
</dependency>
Alternatively, grab the latest jar and chuck it on your class path.
There are two main ways to use SDGen to generate random data. The first way is to use an annotated plain old Java object like so:
Gen.create()
.use(Person.class)
.generate(2) //Number of rows that will be generated
.asCsv()
.toFile("output.csv");
Where the Person class looks like this:
public class Person {
@Generation(NameGenerator.class) //Generator is used to create values
private final String name;
@Range(min=18, max=70) //Range is used to limit the range of values
private final int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
}
Annotations allow us to control how random values are generated.
Omitting Annotations would produce Strings like: f9j)32
, and ints like: -34093
output.csv
would look something like this:
name, age
Bob, 40
Ashley, 22
Here is the same example using a fluent builder:
Gen.create()
.addField("Name", new NameGenerator())
.addField("Age", new IntGenerator(18, 70)
.generate(2) //number of rows to generate
.asCsv()
.toFile("output.csv");
Generators are simple classes that generate random data.
@FunctionalInterface
public interface Generator<T> {
T generate();
}
SDgen provides basic generators for all primitive data types.
To contribute, please fork the project and submit a pull request.
The project is backed by maven
which handles dependency management and
the build process.
Any pull request needs all tests passing (can run tests via mvn test
),
as well as the addition of tests that cover any added code.
FAQs
A random data generator to produce realistic files for multiple file types (e.g. csv, log, json)
We found that au.com.anthonybruno:SdGen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.