我正在运行Apache Cordova 3.6.3-0.2.13.我试着让启动画面工作.我已经按照http://cordova.apache.org/docs/en/3.6.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens上的文档进行了操作.图标正在运行,但启动画面没有成功.我们还在Cordova之上使用Ionic框架(版本1.2.8).
我做了什么:
从项目根目录为config.xml添加了图标和启动画面:
<preference name="SplashScreen" value="splash"/>
<preference name="SplashScreenDelay" value="10000"/>
<platform name="android">
<icon src="icons/icon.png"/>
<!-- you can use any density that exists in the Android project -->
<splash src="icons/android-splash-land-hdpi.png" density="land-hdpi"/>
<splash src="icons/android-splash-land-ldpi.png" density="land-ldpi"/>
<splash src="icons/android-splash-land-mdpi.png" density="land-mdpi"/>
<splash src="icons/android-splash-land-xhdpi.png" density="land-xhdpi"/>
<splash src="icons/android-splash-port-hdpi.png" density="port-hdpi"/>
<splash src="icons/android-splash-port-ldpi.png" density="port-ldpi"/>
<splash src="icons/android-splash-port-mdpi.png" density="port-mdpi"/>
<splash src="icons/android-splash-port-xhdpi.png" density="port-xhdpi"/>
</platform>
Run Code Online (Sandbox Code Playgroud)
当然,icons
目录存在,文件也就位.当我用ionic run android
或构建项目时cordova run android
.构建过程还会在platforms/android/res/drawable
目录中创建图标和启动画面!
位于的配置文件platforms/android/res/xml/config.xml
也正确更新,<preference>
并且<icon>
和<splash>
元素就位.
我也试过org.apache.cordova.splashscreen
插件,也没有成功.我添加了插件 …
我正在使用Apache ActiveMQ version 5.8.0
,我下载了Apache ActiveMQ Browser version 2.5.2.8
在Apache ActiveMQ中,我编辑了activemq.xml
配置以使用JMX:
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" brokerName="localhost" dataDirectory="${activemq.data}">
<!-- This needed to be set to true, otherwise JMX won't start in 5.8.0 -->
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
</broker>
Run Code Online (Sandbox Code Playgroud)
在启动脚本中,我按如下方式设置JMX设置:
#ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099 "
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"
Run Code Online (Sandbox Code Playgroud)
当我重新启动Apache ActiveMQ时,日志显示JMX已启动且可访问:
JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector
Run Code Online (Sandbox Code Playgroud)
还检查端口是否正在侦听结果进入侦听端口:
[me@server ~]$ netstat -lptun | grep 1099
(Not all processes could be identified, non-owned process …
Run Code Online (Sandbox Code Playgroud) 我已经搜索了如何使用亚马逊产品广告API,现在我可以使用亚马逊产品广告API搜索不同的产品,它工作正常.
但据我所知,我们只能从我们的帐户获得亚马逊主要产品,当我使用亚马逊网站登录亚马逊帐户并搜索任何产品时,我发现只有亚马逊主要产品.
但当我尝试使用我的安全ID等亚马逊产品广告API获取亚马逊产品时,亚马逊产品广告API会向我们提供所有搜索产品,但是当我使用亚马逊产品广告API进行搜索时,我只需要优质产品列表.
可能吗 ?谁能帮我 ?
非常感谢你.
如果您在输入XML中有一个默认命名空间,并且要完成XSLT转换,您只想在该命名空间中添加一个元素,那么您将如何做到这一点?
您是否将命名空间声明为XSLT中的默认命名空间?或者您是在XSLT中使用前缀,在XSLT中是否将所有元素都放入该命名空间?
我创建了5个选项,其中一个选项是错误的,而其他4个选项都给出了正确的结果,但我只是想知道哪种方式最好,或者即使有更好的方法?
我使用下一个XML作为所有示例的输入:
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://example.org/uri/">
<element attr="test">
<one>This is an example</one>
<two>Pretty nice</two>
</element>
</data>
Run Code Online (Sandbox Code Playgroud)
选项1,2和3
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pref="http://example.org/uri/" exclude-result-prefixes="pref">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="pref:element">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
<added>Option 1</added>
<xsl:element name="added" namespace="http://example.org/uri/">Option 2</xsl:element>
<added xmlns="http://example.org/uri/">Option 3</added>
</xsl:template>
</xsl:stylesheet>
Run Code Online (Sandbox Code Playgroud)
哪个会产生:
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://example.org/uri/">
<element attr="test">
<one>This is an example</one>
<two>Pretty nice</two>
</element>
<added xmlns="">Option 1</added>
<added>Option 2</added>
<added>Option …
Run Code Online (Sandbox Code Playgroud) 我们制作了一个应用程序,可以在两个设备(ios,android和web)之间进行视频通话.使用cordova,opentok,nodejs和cordova-opentok-plugin.在测试期间,我们注意到Android设备上的声音有点低,很难听到对方说话.我们测试了应用程序中的声音,并将其与Google Hangouts和普通电话的测试进行了比较.从这些测试中我们可以看到音频在我们的应用程序中处于最大音量.音频流通过所有这些应用程序的呼叫通道和我们自己的应用程序.
我们使用Skype测试了相同的设备,也通过呼叫频道进行了测试,而且Skype上的声音比我们自己的应用程序和Google Hangouts甚至是普通的电话都要大得多.
所以看来Skype已经找到了一种提升Android音频的方法.有谁知道我们如何实现这种音频通道的增强/放大?
提前致谢.
我收到了crt
/ cert
格式的新证书.当我在文本编辑器中打开此文件时,他们将完整的证书链添加到此文件中.每个证书都以:
-----BEGIN CERTIFICATE-----
Run Code Online (Sandbox Code Playgroud)
最后是:
-----END CERTIFICATE-----
Run Code Online (Sandbox Code Playgroud)
中间没有空行.由于我不热衷openssl
,我将证书打开到Windows并导出证书,其PKCS#7
格式为完整链(test.p7b).当我打开这个文件时,在Windows中看起来都很好,根,中间和证书都在链中.
当我将文件test.p7b
放在服务器上并尝试导入时keytool
,如下所示:
keytool -import -trustcacerts -alias my.domain.com -keystore my.domain.keystore -keypass changeme -storepass changeme -file test.p7b
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
keytool error: java.lang.Exception: Input not an X.509 certificate
Run Code Online (Sandbox Code Playgroud)
当我测试P7B文件时,我也会收到错误:
bash-4.1$ openssl x509 -in test.p7b -text
unable to load certificate
140009984849736:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:698:Expecting: TRUSTED CERTIFICATE
Run Code Online (Sandbox Code Playgroud)
要么:
bash-4.1$ openssl x509 -in test.p7b -inform DER -text
unable to load certificate
140396587853640:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1320:
140396587853640:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 …
Run Code Online (Sandbox Code Playgroud) 我正在将简单的SOAP XML消息转换为更加扩展的SOAP XML消息.我几乎可以使用它,但我无法解决最后两个问题.我的问题是:
我的源XML文件:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<test>
<element1>123</element1>
<element2>123</element2>
</test>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)
我的XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="fn xs SOAP-ENV">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<!-- Special rule to match the document root only -->
<xsl:template match="/*">
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<xsl:namespace name="a" select="'http://www.w3.org/2005/08/addressing'"/>
<xsl:apply-templates select="@*|node()"/>
</s:Envelope>
</xsl:template>
<!-- Expand soap header -->
<xsl:template match="SOAP-ENV:Header">
<xsl:element name="s:{local-name()}" namespace="http://www.w3.org/2003/05/soap-envelope">
<xsl:element name="a:Action" namespace="http://www.w3.org/2005/08/addressing">
<xsl:attribute name="s:mustUnderstand" namespace="http://www.w3.org/2003/05/soap-envelope">1</xsl:attribute>
<xsl:text>http://www.ortec.com/CAIS/IApplicationIntegrationService/SendMessage</xsl:text>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- …
Run Code Online (Sandbox Code Playgroud) 我一直在为应用程序编写代码来跟踪用户位置并使用Google地图显示它.
我的代码在浏览器(Safari,Firefox,Chrome)中完美运行,但在移动设备(Android)上根本不起作用.
谷歌地图api不起作用,导航不可靠.我是一个离子新手,写了一个相当简单的应用程序来测试它.它有一些离子侧面菜单模板和一些简单的AngularJS控制器.
angular.module('starter.controllers', [])
.controller('AppCtrl', function($scope, $ionicModal, $timeout) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//$scope.$on('$ionicView.enter', function(e) {
//});
// Form data for the login modal
$scope.loginData = {};
// Create the login modal that we will use later …
Run Code Online (Sandbox Code Playgroud) 我是否尝试在换行符上拆分消息并使用以下脚本:
def mesType = "";
def lines = message.getPayload().split("\n");
if ( lines[0][0..6] == '123456' || lines[1][0..6] == '123456') {
mesType = "MES1";
}
if ( lines[0][0..7] == '654321' || lines[1][0..7] == '654321') {
mesType = "MES2";
}
if ( lines[0][0..7] == '234561' || lines[1][0..7] == '234561') {
mesType = "MES3";
}
message.setProperty('mesType', mesType);
return message.getPayload();
Run Code Online (Sandbox Code Playgroud)
但是当我使用它时,我的日志文件中出现以下错误:
groovy.lang.MissingMethodException: No signature of method: [B.split() is applicable for argument types: (java.lang.String) values: {"\n"} (javax.script.ScriptException)
Run Code Online (Sandbox Code Playgroud)
当我将分割线更改为以下内容时:
def lines = message.getPayload().toString().split("\n");
Run Code Online (Sandbox Code Playgroud)
我得到一个错误,该数组是OutOfBound,所以看起来它仍然没有在换行符上做任何事情.
(message.getPayload
)中的消息是来自文件系统的消息,并且包含换行符.它看起来像这样: …
我想知道PouchDB
在移动应用程序中使用本地存储时,架构应该是什么样子localStorage
.
此时我习惯将应用程序的数据缓存到localStorage
需要的时候,我会对后端执行API调用以请求或发布数据.后端掌握着所有的逻辑.如:
然后将所有数据存储到关系数据库中.我现在一直在阅读NoSQL数据库,特别是CouchDB
和PouchDB
.所以我想知道这个架构会是什么样子?对我来说,此时出现了三个问题:
PouchDB
在客户端可以与远程同步PouchDB
.但是,当使用Javascript构建应用程序时,如何PouchDB
通过"黑客"客户端Javascript 确保人们不插入数据?3rd party
,你只需要举一个Sails.js
后端围绕CouchDB
?