使用Oracle中的查询替换列中的字符串(Replace string in a column using query in Oracle)
在我的一个oracle表中,每行的一列中都有一个字符串'House Name'。 我需要用'House Number'代替它。 我可以执行更新查询来查找并替换所有行中的此字符串。或者是否有任何内置函数。
In one of my oracle tables, in one column in every row there is a string 'House Name'. I need to replace it with 'House Number'. Can I execute an update query to find and replace this string in all rows.Or is there any built in function for that.
原文:https://stackoverflow.com/questions/18652135
最满意答案
并非所有选项都默认关闭。 在我们的文档(http://www.jshint.com/docs/)中,您可以看到一些选项是“执行”和一些“放松”[1]。 这意味着默认情况下会显示一些警告,您需要启用“放松”选项才能关闭它们。
现在,有了这些信息,让我们看看你的第二个问题:
/*jshint eqeqeq:false, asi:false */ (function () { console.log(true == true); })()
这段代码将触发一个不安全的比较警告,其中
== true
和缺少分号。 你试图通过关闭两个选项eqeqeq和asi来解决这个问题。 前者如果设置为true,则需要进行严格的比较,并且默认情况下会关闭,因此您可以忽略它。 你会得到一个警告,因为JSHint认为== true/false/0/null
比较不安全,并且目前没有办法关闭它(例如,不会有警告a == b
)[2]。 后面的选项(asi)是一个放松的选项,所以你实际上需要打开它来告诉JSHint可以容忍丢失的分号。 所以为了让你的例子通过,你需要这样改变它:/*jshint asi:true */ (function () { console.log(true === true); }()
[1] - 我知道这很混乱。 由于向后兼容,我不能只是改变选项的工作方式,但我正在努力减少混淆。 我将尽快为文档添加每个选项的默认值。
[2] - 即使没有相应的命名选项,即将发布的1.0.0版本将允许您忽略其代码的任何警告。
Not all options are off by default. In our docs (http://www.jshint.com/docs/) you can see that some options are 'enforcing' and some 'relaxing'[1]. This means that some warnings will be displayed by default and you need to enable 'relaxing' option to turn them off.
Now, with this information, let's look at your second question:
/*jshint eqeqeq:false, asi:false */ (function () { console.log(true == true); })()
This code will trigger an unsafe comparison warning for
== true
and a missing semicolon. You tried to fix that by turning off two options eqeqeq and asi. The former, when set to true, requires strict comparison everywhere and is turned off by default so you can omit it. You get a warning because JSHint considers== true/false/0/null
comparisons unsafe and currently there is no way to turn that off (there won't be warning fora == b
for example)[2]. And the latter option (asi) is a relaxing option so you actually need to turn it on to tell JSHint that it's okay to tolerate missing semicolons. So to make your example pass you will need to change it this way:/*jshint asi:true */ (function () { console.log(true === true); }()
[1] — I understand that this is confusing. Because of backwards compatibility I can't just change how options work but I'm working towards making it less confusing. I will add default values for each option to the docs soon-ish.
[2] — The upcoming 1.0.0 release will allow you to ignore any warnings by their code, even if there's no corresponding named option.
相关问答
更多-
无法运行/查找JSHint(Unable to run/find JSHint)[2023-05-27]
它说无法找到任务 ,而不是jshint可执行文件。 您需要在文档中定义Grunt任务: // Project configuration. grunt.initConfig({ jshint: { all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js'] } }); 编辑:当然你也需要在你的package.json中使用grunt-contrib-jshint 。 It is saying a task cannot be found, no ... -
您可以直接在jshint源中查看boolOptions , valOptions和invertedOptions对象: https://github.com/jshint/jshint/blob/master/examples/.jshintrc 如果您对评论感到困惑,可以参考jshint帮助中的选项部分: http://jshint.com/docs/options/ You can look on boolOptions, valOptions and invertedOptions objects d ...
-
MDN:逗号运营商 逗号运算符计算每个操作数(从左到右)并返回最后一个操作数的值。 例 function myFunc() { var message = "hello"; return (message += "howareya", message); } // returns "hellohowareya" MDN: Comma Operator The comma operator evaluates each of its operands (from left to right) an ...
-
不幸的是,我们的Rhino包装器非常基本,不支持配置文件。 拥有它可能会很好 - 也许你想创建一张票? Unfortunately, our Rhino wrapper is pretty basic and doesn't support config files. It would be nice to have that—perhaps you would like to create a ticket?
-
并非所有选项都默认关闭。 在我们的文档(http://www.jshint.com/docs/)中,您可以看到一些选项是“执行”和一些“放松”[1]。 这意味着默认情况下会显示一些警告,您需要启用“放松”选项才能关闭它们。 现在,有了这些信息,让我们看看你的第二个问题: /*jshint eqeqeq:false, asi:false */ (function () { console.log(true == true); })() 这段代码将触发一个不安全的比较警告,其中== true和缺少分号。 你试 ...
-
我有点尴尬但也很高兴地说内联语法确实有效。 但是由于默认选项,很难说清楚。 我阅读了大部分Chirpy代码库以及UglifyJS的代码库,以确定Chirpy只是将选项的所有值都设置为false 。 这意味着它不需要很多JavaScript代码。 要打开最严格的JSHint选项,请在JS文件的顶部使用它: /*jshint bitwise: true, curly: true, eqeqeq: true, immed: true, newcap: true, noarg: true, noempty: tr ...
-
grunt的精神更多的是编码gruntfile本身使用的文件,而不是在命令行上指定它。 因此,我们需要更多详细信息,说明您为什么要这样做。 我想象了两种可能性: 你只想处理一个子组件:在这种情况下,你会为每个子组件声明不同的目标,并从命令行调用目标: grunt jshint component1 with在你的Gruntfile中: jshint: { component1: [filePath1], component2: [filePath2] } 这是一个性能问题:你只想jshint一些文 ...
-
JSHint未使用的变量(JSHint unused variable)[2023-07-16]
您需要添加导出的指令 /*exported variableName */ You need to add the exported directive /*exported variableName */ -
gulp-jshint包:如何发送参数(没有.jshintrc文件)?(gulp-jshint package: How to send parameters (without .jshintrc file)?)[2022-03-11]
globals是一个数组,不是真的假,这是我的例子。 查找工作就像你在想的那样。 gulp.src(files.backend) .pipe(jshint({ "lookup": false, /* other options */ "globals": ['$']})) .pipe(jshint.reporter(stylish)) .on('error', gutil.log); globals is an array, not true false, here is my e ... -
确定这一点的一种方法是在JSCS Github Repo中搜索“JSHint”或特定规则( 示例搜索 ),因为JSCS文档中的相关规则都具有指向其JSHint等效项的链接。 在撰写本文时,这些是您的短名单的等价物: camelcase = requireCamelCaseOrUpperCaseIdentifiers immed = requireParenthesesAroundIIFE indent = validateIndentation maxlen = maximumLineLength newc ...