ML-IDS | An IDS implementation using machine learning | Machine Learning library
kandi X-RAY | ML-IDS Summary
kandi X-RAY | ML-IDS Summary
An IDS implementation using machine learning
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Train the model
- Returns the next train batch
- Returns the ground truth length
- Returns the batch size
- Returns the length of the feature vector
- Get train data
- Returns the number of train data
- Resets the current batch point
- Get test data
- Returns the number of examples in the train
- Parse command line arguments
- Trains the model
ML-IDS Key Features
ML-IDS Examples and Code Snippets
Community Discussions
Trending Discussions on ML-IDS
QUESTION
On a Java application server we use RandomStringUtils.randomAlphabetic()
to sequentially create HTML-IDs for recurring similar paragraphs in an iterating manner.
Via these generated IDs, we allow for an inner-page anchor navigation (without a page load triggered upon click).
Now the question is, can I use these generated IDs also for URLs linking from external pages to this target?
According to my observation, subsequent requests to the same page, create the same sequence of IDs. If the generated sequence of randomAlphabetic
is indeed predictable (also over multiple page loads), we could not only use these links for inner-page navigation, but also for links referring from outside, since the first, second, third, ... generated ID would always be the same.
ANSWER
Answered 2020-Dec-12 at 13:20If the "random" ID is always the same for a given text string of a paragraph (that is, the ID is solely a function of a paragraph's text), then you should consider hash functions, rather than pseudorandom number generators such as randomAlphabetic
. (I assume that for your use case of identifying parts of a page, the risk of generating duplicate IDs for different text strings is negligible. If you can't tolerate this risk, though, hash functions should not be used.) There are many kinds of hash functions for this purpose; even java.lang.String.hashCode()
will work here since the Java documentation for this method specifies the exact algorithm it uses.
Moreover, randomAlphabetic
is not "deterministic" in the sense you want for two reasons:
- You can't set the seed of the underlying generator the method uses (
RandomStringUtils
stores a static PRNG variable initialized with an undefined seed, namelynew Random()
). - The documentation for
RandomStringUtils.randomAlphabetic
(among otherRandomStringUtils
methods) doesn't specify the exact algorithm it uses to generate random strings.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ML-IDS
You can use ML-IDS like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page