我在XCode中收到此错误:
2013-08-23 14:36:18.284 Tell The DJ[14955:c07] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-08-23 14:36:18.284 Tell The DJ[14955:c07] -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"Device1096677259",
"Device",
"getDeviceInfo",
[
]
]
2013-08-23 14:36:18.285 Tell The DJ[14955:c07] CDVPlugin class CDVConnection (pluginName: NetworkStatus) does not exist.
2013-08-23 14:36:18.285 Tell The DJ[14955:c07] ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-08-23 14:36:18.285 Tell The DJ[14955:c07] …Run Code Online (Sandbox Code Playgroud) 从来就成立了所有必要的描述推送通知这里.
我在启动时注册设备,如:
// register for pushio
$ionicPush.register().then(function(t) {
return $ionicPush.saveToken(t, {ignore_user:true});
}).then(function(t) {
console.log('Token saved:', t.token);
});
Run Code Online (Sandbox Code Playgroud)
设备令牌被记录为"令牌已保存:xxxxthetokenxxxx".
现在我从CURL和Ionic.io仪表板发送推送.消息的状态(使用CURL检查)为200且没有错误.所以推送通知发送:
{"meta": {"request_id": "8d9c69ce-b66c-4002-8cb3-f91c57505b0f", "version": "2.0.0-beta.0", "status": 200}, "data": []}
Run Code Online (Sandbox Code Playgroud)
但我的设备没有收到通知.我认为这是由于saveToken()功能.saveToken()保存令牌的位置在哪里?
有没有人知道如何解决这个问题?
更新:我使用此代码发送推送:
<?php $curl = curl_init();
$token = "mytoken";
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.ionic.io/push/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '
{
"tokens": "bbc654c496abc2dc42a40941ac944f0a8aeb0d5b227d523e335dbd51b71ed646",
"profile": "getto",
"notification": {
"message": "Hello World!" …Run Code Online (Sandbox Code Playgroud) 我用wow.js它animate.css来显示滚动效果.在桌面和移动游戏中,一切都很好但不适用于移动Chrome.我认为chrome确实会使滚动变得与众不同吗?
向下滚动时,内容块应显示淡入淡出效果.但相反,只有滚动完全停止时才会出现.在移动Safari中,当块进入视口时,效果会显示.这是对的.
是否有任何解决方法可以在移动设备上显示移动设备上的动画?
我有一个带有大胆弹出窗口的图库,带有一个分享按钮作为titleSrc.这是在按钮点击时调用的:
function callFacebook(item){
console.log(item);
FB.ui({
method: 'feed',
link: item,
caption: 'Die besten Party-Pics bei party-news.de',
}, function(response){
console.log(response);
});
}
Run Code Online (Sandbox Code Playgroud)
这是一个巨大的弹出式调用:
$('.gallery').magnificPopup({
delegate: 'a', // child items selector, by clicking on it popup will open
type: 'image',
gallery: {
enabled:true,
tCounter: '%curr% von %total%',
preload:false
},
image: {
verticalFit:false,
titleSrc:function(item){
var image = item.el.attr("href");
return '<a class="shareFacebook" onclick="callFacebook(\''+image+'\')" target="_blank"><i class="fa fa-facebook-official"></i> Foto teilen</a>';
}
},
tClose: 'Schliessen',
tLoading: 'Lade Bild...',
// other options
});
Run Code Online (Sandbox Code Playgroud)
我得到点击图像的href并将其传递给callFacebook函数.我第一次点击分享按钮时,它只显示标准的og:标签.当我关闭此窗口并再次单击共享按钮时 - 它可以正常工作.图像显示在共享对话框中.有什么想法吗?
我得到了一个包含文本和图像的大约200个项目的非常大的列表.ng-repeat是缓慢渲染这种顺利的方法.它尝试了这个解决方案.工作得很好.但不是收集重复.
我的网络服务返回:
有特定日期的活动.事件应按日期分组.所以为了使用集合重复,如果你不能使用angular.filter groupBy,如何插入分隔符?
我遇到了ace.js问题。我需要选择一个单词,然后插入不包含=的单词。这是我的代码:
editor.$search.setOptions({needle: '[A-z,0-9,_,\-]*="[A-z,0-9,_,\-,.]*"', regExp:true});
ranges = editor.$search.findAll(editor.session);
randomRange = ranges[Math.floor(Math.random() * ranges.length)];
if (randomRange){
editor.selection.setRange(randomRange);
var content = editor.session.getTextRange(editor.getSelectionRange());
alert(content);
var result = content.replace('=', '');
alert(result);
editor.replace(result);
}
Run Code Online (Sandbox Code Playgroud)
它选择该文本的随机出现。然后我用空格替换=。但是ace.js总是用匹配元素的第二次出现替换文本,而不是选择的第一个出现。有什么建议么?TY!
更新:示例:
<?xml version="1.0"?>
<PurchaseOrder PurchaseOrderNumber="99503" OrderDate="1999-10-20">
Run Code Online (Sandbox Code Playgroud)
它选择version =“ 1.0”,删除=。然后是版本“ 1.0”
但是现在当我调用函数editor.replace(result)时,它将用该文本替换PurchaseOrderNumber =“ 99503”,因此它是:
<?xml version="1.0"?>
<PurchaseOrder version"1.0" OrderDate="1999-10-20">
Run Code Online (Sandbox Code Playgroud) 我从 php 获得了一些变量来适应 facebook 的元标记。\n所以我需要将这些标签附加到js的头部。I\xc2\xb4m 执行以下操作:
\n\n<script>\n $(document).ready(function(){\n console.log("ready");\n $("head").append(\'<meta property="og:title" content="<?php echo $title; ?>"/><meta property="og:type" content="website"/><meta property="og:image" content="http://www.party-news.de/party/images/termine/flyer/<?php echo $pic ?>"/><meta property="og:description" content="Weitere Events und Bilder auf www.party-news.de"/>\');\n });\n </script>\nRun Code Online (Sandbox Code Playgroud)\n\n我在调试器中看到它,但在“源代码视图”中没有看到它。Facebook 也无法识别新生成的元标签。(如果我静态放置这些标签,它们就会起作用)。
\n\n有人可以帮忙吗?
\n