草庐IT

android-cloud-to-device-messaging

全部标签

javascript - 谷歌折线图 : drag to adjust value

我最近放弃使用Graphael和扩展包Ico.我认为它仍然是一个很棒的库,只是需要更好的文档和适当的API才能被广泛采用。我已经将带有图表的区域转换为使用GoogleCharts,但似乎无法找到一种方法来实现我使用graphael实现的一项特定功能:拖动支持。我的一个linecharts需要可编辑,这意味着可以上下拖动线上的各个点来调整值。我一直在尝试寻找事件或在API中附加事件的方法,但没有成功。有没有人设法做这样的事情?据说可以制作自定义图表-是否可以这样做?编辑:似乎不太可能或很难连接到GoogleAPI或输出的SVG。它在iframe中并且没有可用的源代码只会使它的吸引力越来越

javascript - "Warning: Task "巴别塔 "not found. Use --force to continue."

我的gruntfile.js中有这个简单的代码:module.exports=function(grunt){require("load-grunt-tasks")(grunt);//npminstall--save-devload-grunt-tasksgrunt.initConfig({babel:{options:{sourceMap:true},dist:{files:{"dist/app.js":["src/app.js"]}}}});grunt.registerTask("default",["babel"]);};但是运行时显示这个错误:Warning:Task"babe

javascript - react native 路由器通量 : navigate from main scene to child

版本react-native-router-fluxv3.35.0react-nativev0.31我的场景很少。其中一个场景有几个子场景。如何从主场景之一导航到子场景之一?示例:{Actions.login();}}leftTitle="AddAccount"onRight={()=>{Actions.login({type:'reset'});}}rightTitle="Logout"rightButtonTextStyle={styles.ButtonTextStyle}leftButtonTextStyle={styles.ButtonTextStyle}leftButtonS

javascript - 为什么 push 显示 argument of type 'any[]' is not assignable to parameter of type 'never' 错误?

在这段代码中我得到了休闲错误:Argumentoftype'any[]'isnotassignabletoparameteroftype'never'varmarkers:[];this.Getlapoints(this.map.getCenter(),500000).then(data=>{for(varkeyindata){Leaflet.marker(data[key].location,//{icon:greenIcon}).addTo(this.map).bindPopup(data[key].caption);//markers.push(data[key].locatio

javascript - 错误 : Couldn't find preset "es2015" relative to directory

当我尝试使用babel时出现以下错误。Error:Couldn'tfindpreset"es2015"relativetodirectorywebpack.config.jsmodule.exports={entry:'./main.js',ourput:{path:'./',filename:'index.js'},devServer:{inline:true,port:3333},module:{loaders:[{test:/\.js$/,exclude:/node_modules/,loader:'babel',query:{presets:['es2015','react']

javascript - 将 Firebase 托管根目录重定向到 Cloud Functions 不起作用

我将Firebase托管与firebase.json文件一起使用,该文件应该将所有流量转发到云函数(prerender),该函数为SEO填充meta和og标签。{"hosting":{"public":"dist/prod","rewrites":[{"source":"**","function":"prerender"}]}}我的prerender函数正在处理请求并呈现HTML文件。这很好用:exportconstprerender=functions.https.onRequest((req,res)=>{console.log('prerenderfunction:"'+req

javascript - 在 Firebase Cloud Functions 中创建 PDF

我是javascript的新手,我正在尝试使用pdfkit从firebase函数制作PDF文件。下面是我的功能代码。constpdfkit=require('pdfkit');constfs=require('fs');exports.PDFTest=functions.https.onRequest((req,res)=>{vardoc=newpdfkit();varloremIpsum='Loremipsumdolorsitamet,consecteturadipiscingelit.Etiamin...';doc.y=320;doc.fillColor('black')doc.t

正则表达式 : How to bold specific words with regex?

给定一根针和一个大海捞针……我想在针周围加上粗体标签。那么我将使用什么正则表达式来替换()呢?我希望SPACE成为分隔符,我希望搜索不区分大小写所以说针是“牛”,大海捞针是cowsatwww.cows.com,milksomeCOWS会变成cowsatwww.cows.com,milksomeCOWS关键字也应该能够包含空格,所以如果关键字是“whoismgmt”...greatband.whoismgmtbtw?会变成greatband.whoismgmtbtw?谢谢 最佳答案 这是一个正则表达式,可以满足您的需求:(^|\s)(

javascript - Photoshop 脚本 : Move an image to position x, y

我有一个事件的ArtLayer被变量NewLayer引用,我想移动到Canvas中的绝对位置x,y。我已经用谷歌搜索了几个小时,但没有任何结果。有人可以举个例子吗?//谢谢。 最佳答案 经过更多API阅读和搜索后,我得出的结论是只能使用增量移动来移动图层。我编写了这个小函数来将图层定位在绝对位置。希望这对下一个有同样问题的读者有所帮助...//******************************************//MOVELAYERTO//Author:MaxKielland////MoveslayerfLayert

javascript - Chrome 扩展 : How to get current webpage url from background. html

据我所知,直接获取tab.url是不可能的(只能在popup.html中实现)并且进行消息传递也需要打开popup.html。无论如何绕过这个并从background.html获取当前页面url?我最擅长的是消息传递,我在background.html中使用了这段代码varbg=chrome.extension.getPopupPage();varmyURL=bg.myURL;然后在popup.html中我有:chrome.tabs.getSelected(null,function(tab){varmyURL=tab.url;})无论如何,以上根本不起作用。有人知道无需实际打开弹出窗