This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import unittest | |
class LatLon(object): | |
def __init__(self, lat, lon, alt): | |
""" | |
:param lat: Latitude in radians | |
:param lon: Longitude in radians | |
:param alt: Altitude in any unit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package so; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyAgreement; | |
import javax.crypto.SecretKey; | |
import javax.crypto.interfaces.DHPublicKey; | |
import javax.crypto.spec.DHParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.security.*; | |
import java.security.spec.X509EncodedKeySpec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!--XML Export of VCG Results for directory: . Scanned for Java security issues.--> | |
<CodeIssueCollection> | |
<CodeIssue> | |
<Priority>5</Priority> | |
<Severity>Low</Severity> | |
<Title>Operation on Primitive Data Type</Title> | |
<Description>The code appears to be carrying out a mathematical operation on a primitive data type. In some circumstances this can result in an overflow and unexpected behaviour. Check the code manually to determine the risk.</Description> | |
<FileName>Z:\Users\joubin\Downloads\scanthis\lottie\src\main\java\com\airbnb\lottie\AnimatableColorValue.java</FileName> | |
<Line>18</Line> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Contacts" | |
repeat with eachPerson in people | |
repeat with eachNumber in phones of eachPerson | |
set theNum to (get value of eachNumber) | |
if (theNum does not start with "+" and (theNum does not start with "1" and theNum does not start with "0")) then | |
set value of eachNumber to "+1" & theNum | |
else if (theNum starts with "1") then | |
set value of eachNumber to "+" & theNum | |
end if | |
end repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String, Object> commentMap = (new JacksonJsonParser()).parseMap(commentStr); | |
String textComment = String.valueOf(commentMap.get("text")); | |
String htmlEscapedTextComment = HtmlUtils.htmlEscape(textComment); | |
commentMap.put("text", htmlEscapedTextComment); | |
try { | |
commentStr = (new ObjectMapper()).writeValueAsString(commentMap); | |
} catch (JsonProcessingException ignored) { | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PreparedStatement statement = connection.prepareStatement("SELECT * FROM user_data WHERE last_name = ?", | |
ResultSet.TYPE_SCROLL_INSENSITIVE, | |
ResultSet.CONCUR_READ_ONLY); | |
statement.setString(1, accountName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" standalone="yes" ?> | |
<!DOCTYPE author [ | |
<!ELEMENT author (#PCDATA)> | |
<!ELEMENT foo ANY > | |
<!ENTITY js "Testing 123"> | |
<!ENTITY test "something"> | |
]> | |
<foo> | |
<author>&test;</author> | |
<foo>&js;</foo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JWTVerifier verifier = new JWTVerifier(JWT_PASSWORD); | |
verifier.verify(accessToken); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println(xstream.getClass().getPackage().getImplementationVersion()); | |
XStream.setupDefaultSecurity(xstream); | |
xstream.allowTypes(new Class[]{Contact.class}); |