草庐IT

list_files

全部标签

javascript - 咕噜声 : creating a zip file with the current date (AAAA-MM-DD)

我一直在寻找一种使用“grunt-contrib-compress”插件来命名带有当前日期的zip文件的方法。有办法实现吗?我正确安装了它,并设置如下:compress:{build:{options:{archive:'./zipped/foo.zip',mode:'zip'},files:[{src:'build/**'}]}}我想要一个以当前日期命名的压缩文件,以代替自定义名称“foo”:2014-09-25.zip 最佳答案 您可以尝试使用grunt.template.today()...compress:{build:{o

javascript - webpack css loader 不工作 : no output css file

我正在从事开源元素,现在我需要为前端设置webpack。我在下面尝试了webpack配置,JS工作正常,但css不行,没有css输出文件。我不知道为什么会这样,请帮助我。下面是我的webpack配置js文件:constpath=require("path");constwebpack=require('webpack');constExtractTextPlugin=require("extract-text-webpack-plugin");constnode_dir=__dirname+'/node_modules';constsassLoaders=['css-loader','

javascript - Angular AOT : ERROR in ng component html file : Expected 0 arguments, 但得到 1

最初我在发布angular.net核心SPA应用程序时遇到以下错误:Can'tresolverxjs/operatorsinrelease\directives我已经通过将rxjs版本更新到5.6解决了这个问题。现在在发布应用程序时出现以下错误:WARNINGinEnvironmentPlugin-NODE_ENVenvironmentvariableisundefined.Youcanpassanobjectwithdefaultvaluestosuppressthiswarning.Seehttps://webpack.js.org/plugins/environment-plug

javascript - 如何在 Flat List (React Native) 中交替颜色

尝试在ReactNativesFlatlist中替换颜色。我相信我需要rowID或类似的东西来做到这一点。这是我到目前为止所得到的:letcolors=['#123456','#654321','#fdecba','#abcdef'];{item.title},{item.releaseYear}}keyExtractor={(item,index)=>index}/>有什么想法吗? 最佳答案 renderItem回调参数有一个属性index允许您访问当前行的行索引:index}renderItem={({item,index})=

javascript - 谷歌地图 API : pan to markers from a list.

你好:)请耐心等待,我不是编码员,但我正在尝试边做边学。这是我目前正在处理的页面;http://www.websu.it/devnw/dev/contact.html.我目前使用GoogleMapsAPI设置了一张map,使用了以下javascript:functioninitialize(){varmapOptions={zoom:5,center:newgoogle.maps.LatLng(48.160,-6.832),disableDefaultUI:true,mapTypeId:google.maps.MapTypeId.ROADMAP};map=newgoogle.maps.

javascript - IE8 : drag'n'drop files to a webpage

是否可以在IE8中不使用Java等第三方插件? 最佳答案 简答:否长答案:howtodeterminethepresenceofHTML5drag’n’dropfileuploadAPI 关于javascript-IE8:drag'n'dropfilestoawebpage,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/2652780/

javascript - UI自动化 iPhone : Is it possible to segment the script into several files

我想为相当复杂的iPhone应用程序编写UIAutomation(基于JavaScript)测试。我不想使用一个大文件,而是通过使用多个文件来分离测试函数和助手。这可能吗?您如何构建UIAutomation测试? 最佳答案 嘿。是的。虽然import关键字在浏览器中没有为JS实现,但在Instruments中实现了。您只需在使用Instruments运行的“主”JS文件中编写#import"somefile.js"。我没有尝试包含您提供给乐器的原始文件以外的其他位置的文件,但该位置的子文件夹有效。看下面一个基于thispost的例子

javascript - SlickGrid 列选择器 : Setting the default columns to display from a larger list

我目前正在使用SlickGrid并允许用户使用ColumnPicker选择要显示的列。按照http://mleibman.github.com/SlickGrid/examples/example4-model.html的例子我已经能够让它很好地工作。我不确定的下一步是是否可以选择默认的列列表以在首次渲染时显示。例如,假设我有一个包含5列的数组,声明如下:{name:"Name"field:"Name"id:"Name"sortable:trueminWidth:120editor:Slick.Editors.Text},{name:"Address"field:"Address"id

javascript - Selenium 网络驱动程序 : execute_script can't execute custom methods and external javascript files

我正在使用Selenium和Python,我正在尝试做两件事:导入外部javascript文件并执行其中定义的方法在字符串上定义方法并在求值后调用它们这是第一种情况的输出:测试.jsfunctionhello(){document.body.innerHTML="testing";}Python代码>>>fromseleniumimportwebdriver>>>f=webdriver.Firefox()>>>f.execute_script("vars=document.createElement('script');\...s.src='file://C:/test.js';\..

javascript - gulp main-bower-files 正则表达式过滤器不起作用

为什么第二个数组bowerFiles没有过滤成仅javascript文件。vargulp=require('gulp');varmainBowerFiles=require('main-bower-files');gulp.task('default',function(){varunfiltered=mainBowerFiles();console.log('unfilteredfiles:',unfiltered);//11FILES//varjsRegEx=/js$/i;//triedthiswaytoo...varjsRegEx=newRegExp('js$','i');var