我想在运行特定任务时使用Grunt记录警告黄色消息.
目前我grunt.log.subhead用来输出粗体字体,但它没有引起太多关注.
grunt.log.subhead 'You may want to use --sourceMaps option'
Run Code Online (Sandbox Code Playgroud) 所以,我正在尝试用它运行一些规范测试.
{
"scripts": {
"test": "./vendor/davedevelopment/dspec/bin/dspec"
},
"require-dev": {
"esperance/esperance": "dev-master",
"davedevelopment/dspec": "dev-master"
}
}
Run Code Online (Sandbox Code Playgroud)
它运行良好,但没有颜色输出,对于规格测试,这很难阅读.
如何运行脚本但保留原始彩色输出?
是否可以添加一些注释来忽略或修改某个块上的coffeeling规则(缩进)?
我在脚本上使用了最多80列的规则,但是我有一些超过该值的objetc的字符串值,并且打破这些行会使代码更糟糕.
例:
##
# @coffeelint ignore max_line_length
##
object:
attr: "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width"
Run Code Online (Sandbox Code Playgroud) 我需要动态显示/隐藏网格的列,但似乎ExtJs 4没有实现的方法.
在以前的版本中,我应该使用columnModel,它不再存在.
刚刚获得grid.columns[index]和/ hide()或show()不影响网格.
使用grid.columnManaget.getColumns()[index].hide()可以真正隐藏列,但不能再次显示(因为getColumns()之后不返回该列).
我正在创建一个 XSD 来验证 XML,但它给了我以下验证错误:
$ xmllint --noout --schema imoveis.xsd imoveis.xml
imoveis.xml:2: element alugueis: Schemas validity error : Element '{http://www.w3.org/2001/XMLSchema-instance}alugueis': No matching global declaration available for the validation root.
imoveis.xml fails to validate
Run Code Online (Sandbox Code Playgroud)
不知道我忘记了什么。
这是我的XML:
<alugueis xmlns="http://www.w3.org/2001/XMLSchema-instance"
noNamespaceSchemaLocation="imoveis.xsd"
mes="outubro" ano="2012">
Run Code Online (Sandbox Code Playgroud)
https://gist.github.com/paulodiovani/eb287e24de7be99a2263
在这里我验证XSD:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="simulado"
xmlns:doc="simulado"
elementFormDefault="qualified">
Run Code Online (Sandbox Code Playgroud)
如何通过Shell(命令行)或服务器检查PHP脚本是否正在运行?
鉴于下表:
Table "public.vs_protocolo"
Column | Type | Modifiers
-----------------+-----------------------------+-----------------------------------------------------------
id | integer | not null default nextval('vs_protocolo_id_seq'::regclass)
data_criacao | timestamp without time zone | not null default now()
ano_processo | integer | not null
numero_processo | integer | not null
Table "public.vs_protocolo_historico"
Column | Type | Modifiers
--------------+-----------------------------+---------------------------------------------------------------------
id | integer | not null default nextval('vs_protocolo_historico_id_seq'::regclass)
id_protocolo | integer | not null
descricao | character varying(255) | not null
status | integer | not null default 0
data_criacao | timestamp …Run Code Online (Sandbox Code Playgroud) 我正在编写一个脚本来将文件(例如Dropbox Camera Uploads )移动到以年份命名的文件夹,如下所示:
#!/bin/bash
#
# Separate (camera) images on directory
# to year named folders.
#
# All files must be named as "yyyy-mm-dd HH:MM:SS.ext"
#
for img in *.{jpg,jpeg,png}; do
year=${img:0:4}
[ -d "$year" ] || mkdir "$year"
mv -iv "$img" "$year/"
done
Run Code Online (Sandbox Code Playgroud)
该脚本对于匹配文件按预期工作,但是当没有任何具有某种扩展名的文件时,将扩展为*.ex(前两个扩展字符)。然后它创建空目录,如下所示:
'*.jp'
'*.jp'
'*.pn'
Run Code Online (Sandbox Code Playgroud)
我怎样才能忽略不匹配的文件?
php ×2
bash ×1
bdd ×1
coffeelint ×1
coffeescript ×1
composer-php ×1
extjs4 ×1
glob ×1
gruntjs ×1
lint ×1
node.js ×1
postgresql ×1
sql ×1
validation ×1
xml ×1
xsd ×1