按照标题,我该怎么做?
这是我的代码:
var http = require('http');
// to access this url I need to put basic auth.
var client = http.createClient(80, 'www.example.com');
var request = client.request('GET', '/', {
    'host': 'www.example.com'
});
request.end();
request.on('response', function (response) {
  console.log('STATUS: ' + response.statusCode);
  console.log('HEADERS: ' + JSON.stringify(response.headers));
  response.setEncoding('utf8');
  response.on('data', function (chunk) {
    console.log('BODY: ' + chunk);
  });
});
我有一个关于diff命令的问题,如果我想要一个递归目录diff但只针对特定的文件类型,怎么做?
我尝试使用exclude选项,但只能使用一个模式:
$ diff /destination/dir/1 /destination/dir/2 -r -x *.xml
用命令我只能排除XML文件类型,即使是在文件夹中的图像类型的文件(png,gif,jpg)txt,php等
如何只区分某些文件类型.
我想检查postgres中的值类型,如下所示:
SELECT id,
       CASE 
         WHEN val_is_integer THEN (SOME_QUERY)
         WHEN val_isnot_integer THEN (ANOTHER_QUERY)
         ELSE 0
       END
  FROM test;
怎么做?
注意:表中的值是varchar类型,在该字段中有值是numeric和varchar ...
例:
ID | value
1 | test
2 | 10
3 | 12
4 | test123