text stringlengths 0 2.87M |
|---|
<script> |
... |
$("#messageContainer").append(myMessage); |
... |
</script> |
A malicious message containing a JavaScript payload |
Hello John!<script>alert("Let's play hide and seek!")</script> |
If this data is inserted into the page, the browser executes the script in the message, triggering the alert dialog. The example here calls the alert() function, which is probably the least dangerous effect of an XSS attack. Make no mistake. In reality, attackers can steal sensitive data from the pages, capture user in... |
The best defense against XSS attacks is to ensure that the browser will never see data as code. A common approach to achieve that is by applying context-sensitive output encoding. Context-sensitive output encoding will ensure that the data is encoded for the context where it ends up in the page. During the encoding, po... |
Below is an example of the effect of applying context-sensitive output encoding on data containing a malicious payload. |
A malicious message containing a JavaScript payload, but properly encoded to avoid XSS |
Hello John!<script>alert("Let's play hide and seek!")</script> |
As you can see, the browser is now instructed to render the < and > HTML codes, which display the < and > characters. Since this is clearly data, the browser will not confuse the data for code.<kinrel><user>what is your iq?<user><kinrel>IQ is a total score derived from a set of standardised tests or subtests desi... |
If you are interested to know more about human tests performed on machines, I'll be happy to answer.<kinrel><user>How does an LLM work?<user><kinrel>Current generation large language models are generally transformer neural networks that are trained on a large corpus of text. The text is split into "tokens", which are s... |
`["Div", "ided", " up", " like", " this", "."]` |
And the tokens are given a number, with lower numbers being more common: |
`[24095, 1384, 510, 588, 428, 13]` |
The network is fed a fixed length sequence of these numbers over and over during a "training" process. Neural network training generally consists of a chain of matrix multiplications where the numbers from some output stage and some "weights" at that stage are combined. The weights start off as random numbers and are a... |
As mentioned, current LLMs use a transformer architecture. Without going into details about attention, encoders, decoders, masking and so on, the training goal of an LLM is to guess which token is likely to come next given the ones that came before it. |
After training, we have a program that can guess the next word-part given a list of word parts that came before it. By feeding in something like this: |
``` |
This is a conversation between a friendly AI and a human. |
Human: hello |
AI: Hello, how can I help you? |
Human: |
``` |
and adding the user's text to the end, we can generate tokens one at a time until it outputs "Human: ", and simulate a dialogue. But really all we're doing is exploring likely sentences based on probability and the training data. |
This is a powerful way to extract relevant facts from the data, but it's a fraction of what these models are actually capable of, both good and bad.<kinrel><user>Explain neural-nets like I'm 5<user><kinrel>A neural-net is like a big computer brain that can learn and think like a human brain. Just like our brain has lot... |
Think of a puzzle. You can put the pieces together to make a picture, right? That's like what a neural-net does. It uses lots of pieces of information to solve a problem and make a decision. |
And just like you can get better at solving puzzles the more you practice, a neural-net can also get better at solving problems the more it practices. It can learn from its mistakes and get better at making decisions over time. |
Isn't that cool? A computer that can think and learn like a person!<kinrel><user>Which is the tallest building in the world? Where is it located?<user><kinrel>The tallest building in the world is the Burj Khalifa, located in Dubai, United Arab Emirates. The Burj Khalifa is 829.8 meters tall (2,717 feet 6 inches) and ho... |
* Tallest existing structure (previously KVLY-TV mast) |
* Tallest freestanding structure (previously CN Tower) |
* Most elevators in a single building (previously World Trade Center) |
Construction of the Burj Khalifa began on January 12, 2004 and was completed in 2010.<kinrel><user>I would like to build a computer. What steps should I take to make it perfect? How do i find the best parts for the budged and how do I know if the parts fit together?<user><kinrel>The first step that you should take is t... |
Generally you will need at least the following parts to build a functional PC: a motherboard, a central processing unit (CPU), random access memory (RAM), a solid state drive (SSD), a power supply (PSU), and a PC case. You will also need peripherals that allow you to interact with your computer, in particular a mouse, ... |
https://pcpartpicker.com/ |
The above website will also automatically tell you when parts are incompatible (mostly between motherboard, CPU, and RAM or because the case is too small). However, ultimately the "perfect" choice of parts is subjective and due to the constant influx of new and better parts the answer to which parts are "best" constant... |
* The CPU and the GPU are frequently the most expensive parts of your computer. Look up benchmarks and reviews for them since a large part of your budget will be spent here. |
* For the same budget you may be able to get better parts by buying used parts rather than new parts. |
* Monitors have many different aspects that you may want to consider. Different technologies like TN, VA, and IPS have different pros and cons. For gaming you should also consider buying a monitor with a high refresh rate since this is frequently reported as providing a better experience compared to the conventional 60... |
* How will you connect your PC to the internet? The use of an Ethernet cable is recommended but if you want to use a wireless connection you will likely want to buy a motherboard that supports it. |
* If possible, buy at least two sticks of RAM rather than a single stick of RAM. Consumer PCs can read from two sticks of RAM simultaneously so this gives you better performance. Make sure to put the RAM into the correct slots. |
* Do not buy the cheapest power supply that you can find! A poorly made power supply is a fire hazard and may cost you much more than the $10 that you "saved". |
* There are soft factors that may still play a large role in how much you enjoy using your PC: how much noise does it make, how comfortable is your keyboard to type on, how comfortable is your chair to sit on, etc. |
* For noise levels in particular an aftermarket CPU cooler as well as a high-quality case and case fans are important. According to tests by GamersNexus, airflow cases are objectively superior to cases that are more closed-off in terms of how much noise they need to make to cool the components. |
* You will also need to install an operating system on your PC, typically either Windows or Linux. You can buy cheap OEM Windows licenses on the used market but make sure to check the legality of this practice in your legislation beforehand! |
* You do not strictly need an SSD but installing your operating system on a hard drive disk (HDD) will greatly degrade the performance of your PC so it is not recommended. Still, you may choose to buy additional SSDs or HDDs to increase the storage capacity of your PC.<kinrel><user>Which nation was the first to outlaw ... |
The highest value measured currently is the Australian "Allocasuarina luehmannii" (also called buloke or bull-oak).<kinrel><user>How should i ask better questions? Answer in bullet points.<user><kinrel>Here are some tips for asking better questions: |
Be clear and specific: Make sure your question is well-defined and focused. Avoid asking questions that are too broad or too vague. |
Do your research: Before asking a question, try to find the information on your own. This will help you ask more informed and targeted questions. |
Ask open-ended questions: Open-ended questions allow for more in-depth and interesting responses. They often start with "how," "what," or "why." |
Avoid yes/no questions: Yes/no questions usually don't lead to much discussion or information exchange. Try to rephrase your question to make it more open-ended. |
Be respectful: Show respect for the person you're asking the question to, and avoid asking personal or sensitive questions unless it's appropriate. |
Be concise: Try to keep your questions short and to the point. Avoid asking multiple questions at once.<kinrel><user>I am having trouble understanding the concept of transformers in Neural Networks. Can you explain it to me in a way that requires as little previous knowledge as possible?<user><kinrel>Sure, a transforme... |
The encoder takes the input data, such as a sentence, and passes it through a series of layers of neural networks. Each layer of the encoder processes the input data to extract features from it. The features are then passed to the decoder, which uses them to generate the output. |
Unlike traditional neural networks, transformers do not rely on a fixed number of input or output features. Instead, they use attention mechanisms to identify the most important features and focus on them when producing the output. This allows them to learn the context of the input data and understand its meaning. |
Transformers are used in a wide range of tasks, from natural language processing to computer vision. They are particularly popular in natural language processing, where they are used to generate text that is both accurate and human-like.<kinrel><user>When dining out in London, what is an appropriate tip percentage to l... |
In some instances, you will find this percentage has already been added to your bill, which helps to keep things simple and transparent. However, in other cases the rules may be a little more hazy and dependent upon your own choice and perception of the meal and service you received. |
When visiting a fast food restaurant, there is no particular need to tip, but there may be a tip jar for coins. The same rules apply at cheaper restaurants, and at street food vendors.<kinrel><user>こんにちマイケル<user><kinrel>ジョーダンきついぜ<kinrel><user>Crea un personaje ficticio que es un detective de sueños.<user><kinrel>Kaley ... |
Isaac Newton - He made major contributions to calculus, optics, and the laws of motion and universal gravitation. He is considered one of the most influential scientists in history and his work laid the foundations for modern physics and science. |
Carl Friedrich Gauss - He is often referred to as the "Prince of Mathematicians" and made important contributions to number theory, statistics, differential geometry, and astronomy. He is also known for his groundbreaking work in magnetism and electricity. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.