我试图从文件列表中识别mp3文件并对它们进行操作,但即使我使用了"this",我的代码也会删除所有"b.type“,即使它与正则表达式不匹配
//MP3 TIME
$('.secure .content li.file b.type').each(function() {
var fileType = $(this).text();
if(/[MP3]/.test(fileType) == true){
$(this).remove();//just to see if it works
}
});
我想在vim + syntastic中激活对scons文件的检查。
我的.vimrc包括:
au BufNewFile,BufRead SCons* set filetype=scons
let g:syntastic_scons_checkers = ['flake8']
打开scons文件和:SyntasticInfo
Syntastic version: 3.6.0-86 (Vim 704, Linux)
Info for filetype: scons
Global mode: active
Filetype scons
我有点小麻烦。当我使用askopenfilename时,它在Windows和Linux上工作得很好,但Mac似乎对我竖起了手指。
下面是一个例子:
... (Code before all this)
def openFile(self):
self.fileName = askopenfilename(filetypes=[("All Files", "*.*")])
... (Code after all this)
问题是,当我点击打开按钮时,这个方法会被调用,甚至在Mac上也会打开对话框,但对话框中的所有内容都是灰色的,不允许我选择任何文件。为