我有名为 frameBytes 的 Uint8Array。我已经用这段代码从这个字节数组中创建了 RGBA 值。
for (var i = 0; i < frameBytes.length; i++) {
imgData.data[4 * i] = frameBytes[i];// red
imgData.data[4 * i + 1] = frameBytes[i]; // green
imgData.data[4 * i + 2] = frameBytes[i];// blue
imgData.data[4 * i + 3] = 255; // alpha
}
Run Code Online (Sandbox Code Playgroud)
然后我使用以下代码将此 GRBA 值显示到画布上。
var ctx = fingerFrame.getContext('2d');
var imgData = ctx.createImageData(fingerFrame.width, fingerFrame.height);
ctx.putImageData(imgData, 0, 0, 0, 0, fingerFrame.width, fingerFrame.height);
Run Code Online (Sandbox Code Playgroud)
在那之后,我曾经使用以下代码在画布中对图像标记进行图像处理:
const img = document.getElementById('i');
img.src = fingerFrame.toDataURL();
Run Code Online (Sandbox Code Playgroud)
但我不想使用画布。我想直接在 Uint8Array 的图像标签中显示图像。我怎样才能做到这一点?任何帮助将不胜感激。
我到了java.lang.NullPointerException.我在app level gradle中更改了build.gradle.我的build .gradle如下:
apply plugin: 'com.android.application'
apply from: "../../../buildCommon/applicationCommon.gradle"
apply from: "../../../buildCommon/common.gradle"
android {
compileSdkVersion 19
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "era.safetynet.payment.apps"
minSdkVersion 14
targetSdkVersion 17
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project.modules."acra"
compile ":neurotec-biometrics-client-android"
compile ":neurotec-devices-fscanners-nitgen-android"
compile ":neurotec-devices-fscanners-suprema-biomini-android"
compile ":neurotec-devices-fscanners-bluefin-android"
compile ":neurotec-devices-multimodal-credenceid-android"
compile ":neurotec-devices-fscanners-digitalpersona-uareu-android"
compile ":neurotec-devices-fscanners-secugen-android"
compile ":neurotec-devices-fscanners-futronic-android"
compile ":neurotec-devices-fscanners-integratedbiometrics-android"
compile ":neurotec-devices-fscanners-smufsbio-android"
compile ":neurotec-devices-fscanners-startek-android"
compile ":neurotec-devices-fscanners-nextbiometrics-android"
compile ":neurotec-devices-irisscanners-iritech-irishield-android"
compile ":neurotec-devices-media-android"
compile project(':ftrSDKHelperAndroid')
compile 'com.android.support:support-v4:19.1.0'
compile project(":samples-utils") …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Netbeans 8.2 中创建一个新的 java maven 项目。我正在按照以下步骤操作:
日志:
Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个可以验证面部的Android应用程序但是当我尝试在我的模拟器上运行我的应用程序(使用Eclipse)时,我在logcat中得到了这个结果:
06-16 14:51:24.326: E/AndroidRuntime(4305): FATAL EXCEPTION: main
06-16 14:51:24.326: E/AndroidRuntime(4305): Process: com.neurotec.samples.faceverification, PID: 4305
06-16 14:51:24.326: E/AndroidRuntime(4305): java.lang.ExceptionInInitializerError
06-16 14:51:24.326: E/AndroidRuntime(4305): at com.neurotec.view.NGui.<clinit>(NGui.java:56)
06-16 14:51:24.326: E/AndroidRuntime(4305): at com.neurotec.view.NViewBase.<clinit>(NViewBase.java:30)
06-16 14:51:24.326: E/AndroidRuntime(4305): at java.lang.reflect.Constructor.constructNative(Native Method)
06-16 14:51:24.326: E/AndroidRuntime(4305): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
06-16 14:51:24.326: E/AndroidRuntime(4305): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:341)
06-16 14:51:24.326: E/AndroidRuntime(4305): at android.app.Activity.setContentView(Activity.java:1975)
06-16 …Run Code Online (Sandbox Code Playgroud) 我想将一个int列表从C#传递给一个用vb6编写的dll.在vb6中,函数的原型如下:
Public Function FamIdentify(agentList As Collection, strName As String, strIdentifyTemplate As String, strIP As String) As Boolean
Run Code Online (Sandbox Code Playgroud)
从C#我调用这个函数如下:
public Boolean IdentifyFinger(String name, String SampleModel, String REMOTE_ADDR)
{
List<int> agentList = new List<int>();
// insert some element to this list
FamServer.FamApp famApp = new FamServer.FamApp();
Boolean flag = famApp.FamIdentify(ref agentList, ref name, SampleModel, REMOTE_ADDR);
return flag ;
}
Run Code Online (Sandbox Code Playgroud)
对于这种编码,我面临这个错误
cannot convert from system.collections.generic.list to string to Vba.collections
Run Code Online (Sandbox Code Playgroud)
如何将列表从C#传递给vb6?请帮我 .
我有一个简单的php脚本:
<?php
$DB = '//10.11.201.170:1521/XE';
$DB_USER = 'BIOTPL';
$DB_PASS = 'biotpl';
$DB_CHAR = 'AL32UTF8';
$conn = oci_connect($DB_USER, $DB_PASS, $DB, $DB_CHAR);
if($conn)
{
echo "Successfully connected to Oracle.\n";
OCILogoff($c);
//$statement = oci_parse($conn, 'select 1 from dual');
//oci_execute($statement);
//$row = oci_fetch_array($statement, OCI_ASSOC+OCI_RETURN_NULLS);
}
else
{
$err = OCIError();
echo "Connection failed." . $err[text];
}
?>
Run Code Online (Sandbox Code Playgroud)
当我运行它(从浏览器或命令行)时,出现错误:
Call to undefined function oci_connect
Run Code Online (Sandbox Code Playgroud)
我正在使用php 5.6.24。我已经将php_oci8.dll和php_oci8_11g.dll复制到/ ext文件夹中。我有
extension=php_oci8.dll
extension=php_oci8_11g.dll
Run Code Online (Sandbox Code Playgroud)
在我的php.ini中,我已经安装了即时client_11_2-尝试了32位版本。我有ORACLE_HOME和TNS_ADMIN环境变量指向即时客户端文件夹(C:\ instantclient_11_2)。
我花了数小时的时间来尝试不同的事情,但无济于事。
我已经安装了Microsoft Visual C ++ 2010运行时(x86)。OCI8扩展需要此功能。我已经安装了Microsoft Visual C ++ 2012 Runtime(x86)。PHP需要此功能。
当我尝试以下命令时:
php --ri …Run Code Online (Sandbox Code Playgroud) 我想减少bootstrap 4模态默认的height和width。为此,我编写了以下代码:
<div class="modal-header" style="background-color: darkblue;color:#fff;height:5%;!important">
<p class="mx-auto d-block">Please Give Your Finger</p>
</div>
Run Code Online (Sandbox Code Playgroud)
我已将模式标题的高度设置为5%。但高度与默认值相同。如何降低引导程序模态头的高度?
I have a String array in java as follows.
String[] text = {"hello", "bye"};
Run Code Online (Sandbox Code Playgroud)
Now I need to use Java stream API to calculate the length of each string in this array. I do not want to use for loop. How can I do that?
Update: I have checked this link and got the following code to get the sum of the length of each string of this array.
Arrays.stream(text)
.filter(Objects::nonNull)
.mapToInt(String::length)
.reduce(0,Integer::sum);
Run Code Online (Sandbox Code Playgroud)