我一直在从事一个将带有捕获图像的文本数据上传到服务器的项目。但是然后我在iOS中遇到了此错误,但在Android上运行良好。我已经尝试使用NATIVE_URI,FILE_URI但效果不好。
这是它在Xcode终端中产生的错误:
这是代码:
const options: FileUploadOptions = {
fileKey: 'webcam',
fileName: 'dtr.jpg',
chunkedMode: false,
headers: {}
};
const cameraOptions: CameraOptions = {
quality: 50,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
allowEdit: false
};
this.camera.getPicture(cameraOptions).then((imageData) => {
this.yourImage = 'data:image/jpeg;base64,' + imageData;
const endPoint = ENPOINT_URL;
fileTransfer.upload(this.yourImage, endPoint, options)
.then(
(data) => {
this.dismiss();
$('.on-success').show();
},
(err) => {
this.presentAlertConfirm(JSON.stringify(err));
});
}, (err) => {
this.dismiss();
this.presentAlertConfirm(JSON.stringify(err));
});
...
Run Code Online (Sandbox Code Playgroud)
版本信息
我在加密128位密钥时得到了它.我该怎么做才能扭转这个过程.我几乎要坐在这里差不多一个小时才想到这个,但我不能.我刚接触这个btw.
样本输入是:J§???????ÿK??{??
输出应该是: hello
在这个计划中:
样本输入是:hello
输出是: J§???????ÿK??{??...
public class en {
public static void main(String[] args){
...
try{
System.out.print("Enter text: ");
String text = dataIn.readLine();
String key = "dAtAbAsE98765432"; // 128 bit key
// Create key and cipher
Key aesKey = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES");
// encrypt the text
cipher.init(Cipher.ENCRYPT_MODE, aesKey);
byte[] encrypted = cipher.doFinal(text.getBytes());
System.err.println("Encrypted: " + new String(encrypted));
// Decrypt the text
cipher.init(Cipher.DECRYPT_MODE, aesKey);
String decrypted = new String(cipher.doFinal(encrypted));
System.err.println("Decrypted: " + …Run Code Online (Sandbox Code Playgroud) 我正在学习c ++,我必须做这个练习,我必须计算并用用户输入的光线打印出圆形区域.这似乎工作,但结果它不是一个双重而是一个int类型.为什么?提前致谢.这里的代码:
#include <iostream>
double area_f(double raggio_f); //prototype
using namespace std;
int main(){
double raggio, area;
cout << "inserire il raggio: " << endl;
cin >> raggio;
area = area_f(raggio);
cout << area;
return 0;
}
double area_f(double raggio_f){
double risultato;
risultato=raggio_f*raggio_f*3,14;
return (risultato);
}
Run Code Online (Sandbox Code Playgroud) 美好的一天!我明天有报告,我正在审查Smalltalk.我试图使用该raisedTo:方法,但它给了我这个错误:
MessageNotUnderstood: Character>>raisedTo:
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
|x y z|
x := UIManager default request: 'P1: '.
y := UIManager default request: 'P2: '.
z := x raisedTo: y.
self inform: z.
Run Code Online (Sandbox Code Playgroud)