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
//validator.js | |
//This is not a recommended password policy, this is purely an example that allows me to use nodeunit | |
var minimumLength = 12; | |
var minimumCriteria = 4; //if you only want to impose 2 of the 4 possible criteria, simply change this to 2 | |
var hasNumeric = /\d+/; | |
var hasUpper = /[A-Z]+/; | |
var hasLower = /[a-z]+/; | |
var hasSpecial = /[!\"£$%^&\*()_\+\-={}\[\];'#:@~,\.\/<>\\?\|]/; |
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
//test_validator.js | |
var validator = require('./validator'); | |
exports['validate'] = function (test) { | |
//these tests need to fail with an error being thrown | |
test.throws(function () { validator.validate(); }, 'Expected a string', 'value passed is not a string'); | |
test.throws(function () { validator.validate(null); }, 'Expected a string', 'value passed is not a string'); | |
test.throws(function () { validator.validate(true); }, 'Expected a string', 'value passed is not a string'); |
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 java.security.MessageDigest; | |
public class KeyStretching { | |
public static void main(String[] args) | |
throws Exception { | |
String key = ""; | |
String password = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
String salt = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
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
public final static String W_TIMEOUT = "ScriptSampler.doubleuTimeout"; //$NON-NLS-1$ | |
... | |
public String getDoubleuTimeout() { | |
return getPropertyAsString(W_TIMEOUT); | |
} | |
public void setDoubleuTimeout(String doubleuTimeout) { | |
setProperty(W_TIMEOUT, doubleuTimeout); |
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
doubleuTimeout.displayName=wtimeout | |
doubleuTimeout.shortDescription=The wtimeout value of the global WriteConcern. Default is 0. |
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
createPropertyGroup("options", new String[] { | |
"doubleuTimeout", | |
"fsync", | |
"j", | |
"safe", | |
"w" }); | |
... | |
p = property("doubleuTimeout"); |
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
public final static String W_TIMEOUT = "ScriptSampler.wTimeout"; //$NON-NLS-1$ | |
... | |
public String getWTimeout() { | |
return getPropertyAsString(W_TIMEOUT); | |
} | |
public void setWTimeout(String wTimeout) { | |
setProperty(W_TIMEOUT, wTimeout); |
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
wTimeout.displayName=wtimeout | |
wTimeout.shortDescription=The wtimeout value of the global WriteConcern. Default is 0. |
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
createPropertyGroup("options", new String[] { | |
"wTimeout", | |
"fsync", | |
"j", | |
"safe", | |
"w" }); | |
... | |
p = property("wTimeout"); |
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
ERROR - jmeter.testbeans.BeanInfoSupport: Cannot find property: wTimeout in class class jan.mongometer.ScriptSampler |
NewerOlder