public void getTestDats(String unique_id) {
final String tag = "testList";
String url = Constants.BASE_URL + "test_module.php";
Map<String, String> params = new HashMap<String, String>();
params.put("user_id", SharedPreferenceUtil.getString(Constants.PrefKeys.PREF_USER_ID, "1"));
params.put("unique_id", unique_id);//1,2,3,4,5
DataRequest loginRequest = new DataRequest(Method.POST, url, params, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
switch (response.optInt("unique_id")) {
case 1:
//task 1
break;
case 2:
//task 2
break;
default:
//nothing
}
}
}, new ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
//I want to know which unique_id request is failed …
Run Code Online (Sandbox Code Playgroud) 我正在尝试为文件生成SHA-256哈希.
我使用了https://www.npmjs.com/package/crypto-js库.请看下面的代码.
import { Component, OnInit } from '@angular/core';
var SHA256 = require("crypto-js/sha256");
@Component({
moduleId: module.id,
selector: 'dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
hash: string;
constructor() { }
ngOnInit() {}
onFilesChange(fileList : Array<File>){
this.fileList = fileList;
console.log(fileList);
for(var file in fileList){
this.hash = SHA256(file);
console.log(this.hash.toString());
}
}
}
Run Code Online (Sandbox Code Playgroud)
文件:sha-256的文件 ,上面的代码我得到了sh256 hash:5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9
但我参考了许多在线网站,如http://onlinemd5.com/,http://www.online-convert.com/,https://md5file.com/calculator
表格在线网站我在sha256哈希下面:27bb4358e847d559bed9f34eeee51ca71f51542afb0de4017b80dd66a0656eca
任何人都可以告诉我为什么我会得到不同的哈希?
我已经创建了函数和内部函数我在回调响应后调用一个回调函数我有更新字符串变量但这个字符串变量没有更新我的视图.
import { Component } from 'angular2/core';
@Component({
selector : "myview"
templateUrl : 'app/view/myview.component.html'
})
export class ViewComponent {
getAddress : string;
public totlaBalance : string;
getBalance():void{
var self = this;
getBalanceData(this.getAddress,function(error,res){
console.log(res);
self.totlaBalance = res;
});
}
}
Run Code Online (Sandbox Code Playgroud)
在html文件中
<h1>Balance = {{totlaBalance}} </h1>
Run Code Online (Sandbox Code Playgroud)
package.js
"dependencies": {
"angular2": "2.0.0-beta.15",
"systemjs": "0.19.26",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.6.10",
"bootstrap": "^3.3.6"
},
Run Code Online (Sandbox Code Playgroud)
在控制台值中显示但在视图中值不更新.
我正在使用第三方回调函数,它不允许使用箭头功能.
我可以使用Designer工具在phpmyadmin 3.4.0中创建ERD,但是如何将其导出为PDF?
我可以看到[PDF模式的导入/导出坐标]按钮,但看不到它的作用,或者如何获取我的ERD的PDF.
提前致谢.
angular ×2
javascript ×2
android ×1
api ×1
cryptojs ×1
export ×1
php ×1
phpmyadmin ×1
sha256 ×1