Guava
Hashids.java
Our great sponsors
Guava | Hashids.java | |
---|---|---|
58 | 31 | |
49,329 | 1,010 | |
0.4% | 0.1% | |
9.6 | 0.0 | |
6 days ago | 6 months ago | |
Java | Java | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Guava
-
Lists: do you know the nature of yours? The strange story of a data container in Java
The first problem is at the level of Type System, given that a situation more correct would allow us to distinguish through the Collection Type which abstraction we are operating with, species if definable as mutable or immutable. The JCF was born at a time when great care was taken to offer immediate operational data structures, and with attention to performance, but with less attention to constructs or uses that are now seen as common. These concepts have been taken up by other infrastructures from which we certainly cannot fail to mention: Eclipse Collection, Guava Collections, and VAVR.
-
Google/guava: Google core libraries for Java
Even better is getting Gradle/Maven to correctly pull "plain" vs "Android" versions of the package instead of them just publishing the diverging code base as two repository packages.
-
Guava 32.0 (released today) and the @Beta annotation
I'll admit I'm surprised to see that BOMs have been documented on maven.apache.org since mid-2008. It looks like Spring, for example, didn't adopt them until mid-2014. I don't know how widely they caught on in other areas. The first discussion of them in the context of Guava may have been in 2018, as I don't see mention of them in the various issues from 2011-2015 (#605, #1329, #1471, #1954.
-
Best Practice of Guava ImmutableList
And a quick peek at the source code for ImmutableList seems to confirm this (https://github.com/google/guava/blob/master/guava/src/com/google/common/collect/ImmutableList.java - it goes via a bunch of methods, but ends up using Arrays.copyOf(), which creates a fixed-size array).
-
Genuine question: how do you all use Haskell IRL?
The guava library of Java has some of these data structures implemented: https://github.com/google/guava/wiki/ImmutableCollectionsExplained , but implementations of the above book in many languages can be found on github (say, this one for Haskell: https://github.com/aistrate/Okasaki )
- Murmurhash -criando um rollout progressivo via backend
-
Один из примеров почему ChatGPT еще очень далеко до замены программистов, та и остальных профессий тоже.
Java Mask: Java Mask is a library that offers various string masking techniques for sensitive data such as credit card numbers, email addresses, and more. You can find the library at: https://github.com/miguelfreitas93/java-mask DataMasker: DataMasker is a Java library specifically designed for masking sensitive data, including credit card numbers, using customizable masking patterns. Visit the GitHub repository for more information and usage examples: https://github.com/GDSSecurity/DataMasker Maskify: Maskify is a simple Java library that can be used to mask credit card numbers, Social Security numbers, and other sensitive information. You can find the library at: https://github.com/jonathancarvalhoalves/maskify CreditCardUtils: This is a lightweight Java library that provides utility methods for validating, formatting, and masking credit card numbers. Visit the GitHub repository for more information: https://github.com/malkusch/creditcardutils Google Guava: Google Guava is a popular set of Java libraries containing a wealth of utilities for working with strings, collections, and more. While not specifically designed for masking credit card information, you can use Guava's string manipulation methods to mask sensitive data: https://github.com/google/guava
-
Twitter makes some of its source code public
I mean, I guess, technically? If you define it like that, then Microsoft has people working for them for free, as does Google, as does Apple, etc. It's not that weird, and you can try to twist it to be weird, but those of us in the software industry largely regard this as a good thing.
-
Managing unfixable CVEs
So we have https://github.com/google/guava/issues/4011
-
Java 17 migration: bias locks regression
Ok, so let's implement our lazy initialization more smartly to avoid acquiring the lock every time and use old fashion but still working double-checked locking. I've found it implemented by Suppliers.memoize in guava library.
Hashids.java
- Hashids: Generate short unique ids from integers
-
Auto Generate Sequential UIID
You basically want Hashids but sequential? Why not simple convert a base 10 (0-9) number to hex? (0-F)
-
Features I'd Like in PostgreSQL
I found hashids [1] to be a great compromise between integer ids in the database and copyable non-enumerable strings on the client.
- Short, friendly base32 slugs from timestamps
-
We Chose NanoIDs for PlanetScale’s API
I wonder how this might compare to just storing regular autoincrementing ints in the database, and converting to/from hashids (https://hashids.org/) at the edge. It eliminates the collision concern and stores more compactly at the cost of a tiny amount of encode/decode when processing requests. You’d want to push it down as close to the database layer as possible to avoid inadvertent int ID leaks; I added native hashids support to clickhouse but I’m not sure what other database support might entail.
-
How can I generate truly unique slugs?
Since hashids are not really hashes and are not secure at all this is not even achieved. Hashids can be easily decoded without the salt by a simple brute-force attack described by the authors of hashid themselves right on their website: https://hashids.org/
-
How to handle id-based routes with UUID
You don't necessarily need to use UUIDs. You could use something like Hashids to generate random strings from your sequential IDs in a reversible way, so that users can't predict what their values will be, but you can decode them as needed.
-
All of my database models have id replaced with UUID4s. Is there any risk to using these in URLs?
You should not use UUIDv4 as a primary key. You can use normal int values and then use hashids to make them safe for URL. UUIDv7 might be good to use as well once they are more widely supported as well.
- What’s Django’s argument for using 64-bit int as default pk over uuid. Can anyone point me to something I can read?
- Library for generating string IDs from number IDs
What are some alternatives?
JGit - JGit project repository (jgit)
BLAKE3 - the official Rust and C implementations of the BLAKE3 cryptographic hash function
javatuples - Typesafe representation of tuples in Java.
uuid7 - UUID version 7, which are time-sortable (following the Peabody RFC4122 draft)
Caffeine - A high performance caching library for Java
Eclipse Collections - Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.
Embulk - Embulk: Pluggable Bulk Data Loader.
Gephi - Gephi - The Open Graph Viz Platform
JADE - a pug implementation written in Java (formerly known as jade)
ZXing - ZXing ("Zebra Crossing") barcode scanning library for Java, Android
CRaSH - The shell for the Java Platform