分类 Code 下的文章

2.MD5 Using MessageDigest Class

java.security.MessageDigest class:

MessageDigest.getInstance(String Algorithm)
public void update(byte [] input)
public byte[] digest()

generates a hash for a password and then verifies it:

@Test
public void givenPassword_whenHashing_thenVerifying() 
  throws NoSuchAlgorithmException {
    String hash = "35454B055CC325EA1AF2126E27707052";
    String password = "ILoveJava";
        
    MessageDigest md = MessageDigest.getInstance("MD5");
    md.update(password.getBytes());
    byte[] digest = md.digest();
    String myHash = DatatypeConverter
      .printHexBinary(digest).toUpperCase();
        
    assertThat(myHash.equals(hash)).isTrue();
}

- 阅读剩余部分 -

删除表A的记录时,Oracle 报错:“ORA-02292:违反完整约束条件(XXX.FKXXX)- 已找到子记录

1、找到以”FKXXX“为外键的表A的子表,直接运行

select a.constraint_name, a.table_name, b.constraint_name
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and a.r_constraint_name = b.constraint_name
and a.constraint_name = 'FKXXX'

2、删除相应的子表记录

3、删除主表记录

————————————————
版权声明:本文为CSDN博主「dreamcode」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Dreamcode/article/details/38367673

To check whether a certain field is valid, use:
检查某个输入是否有效:

$('#myField')[0].checkValidity(); // returns true/false

To check if the form is valid, use:
检查表单是否有效:

$('#myForm')[0].checkValidity(); // returns true/false

If you want to display the native error messages that some browsers have (such as Chrome), unfortunately the only way to do that is by submitting the form, like this:
如果需要显示一些浏览器(如Chrome)的原生错误信息,唯一的方法是通过提交表单:

var $myForm = $('#myForm');

if(! $myForm[0].checkValidity()) {
  // If the form is invalid, submit it. The form won't actually submit;
  // this will just cause the browser to display the native HTML5 error messages.
  $myForm.find(':submit').click();
}

Hope this helps. Keep in mind that HTML5 validation is not supported in all browsers.
希望这有帮助。请记住,并非所有的浏览器都支持HTML5验证。

How to force a html5 form validation without submitting it via jQuery

默认只支持http代理。
带用户认证的代理:http://username:password@127.0.0.1:1080

设置

npm config set proxy http://127.0.0.1:1080
npm config set https-proxy http://127.0.0.1:1080

查看

npm config get proxy
npm config get https-proxy

清除

npm config delete proxy
npm config delete https-proxy

查看所有自定义设置信息

npm config ls