我正在尝试根据列$("body").on("focus", ".mdb-autocomplete", function() {
var states = [
"Alabana",
"Alaska",
"Arizona",
"Arkansas",
"California"];
$(this).autocomplete({
source: states,
minLength:0,
});
return false;
}).bind('focus', function(){ $(this).autocomplete("search"); } );
中的值进行搜索,并在列➜ kontinuum git:(ligi_wip2) ✗ ./gradlew clean run --stacktrace
Parallel execution is an incubating feature.
* Where:
Build file '/home/ligi/kontinuum/build.gradle' line: 15
* What went wrong:
A problem occurred evaluating root project 'kontinuum'.
> Failed to apply plugin [id 'kotlin']
> For input string: ""
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'kontinuum'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:176)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:181)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:599)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:125)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLauncher.java:233)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuildAction.execute(DefaultGradleLauncher.java:230)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:160)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'kotlin']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:155)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:44)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.java:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_59bsa4g28e7wfd7hj9y0560h5.run(/home/ligi/kontinuum/build.gradle:15)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90)
... 62 more
Caused by: java.lang.NumberFormatException: For input string: ""
at org.jetbrains.kotlin.incremental.CacheVersion.getActualVersion(CacheVersion.kt:44)
at org.jetbrains.kotlin.incremental.CacheVersion.checkVersion(CacheVersion.kt:57)
at org.jetbrains.kotlin.incremental.BuildCacheStorage.<init>(BuildCacheStorage.kt:83)
at org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices.<init>(KotlinGradleBuildServices.kt:68)
at org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices.<init>(KotlinGradleBuildServices.kt:34)
at org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices$Companion.getInstance(KotlinGradleBuildServices.kt:54)
at org.jetbrains.kotlin.gradle.plugin.KotlinBasePluginWrapper.apply(KotlinPluginWrapper.kt:41)
at org.jetbrains.kotlin.gradle.plugin.KotlinBasePluginWrapper.apply(KotlinPluginWrapper.kt:34)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:139)
... 72 more
中找到字符串,例如:
专栏.dropdown-menu{
z-index: 123;
}
B
专栏A
A
我正在尝试使用列abc, cde | abc, 1234 | cde | abc, etc
中的值,并在列B
中搜索和匹配,并在列abc, cde
中返回匹配/不匹配的值。
我尝试使用B
函数并返回匹配值或不匹配但是它返回的所有内容都没有匹配,并且它没有搜索列A
上具有|匹配的值
我可以使用的任何公式?
答案 0 :(得分:1)
如果你想要的是获得一个布尔值, ie TRUE
或FALSE
,它告诉你单元格B1
中的字符串是否在某个地方单元格A1
的字符串值,您可以
=NOT(ISERR(SEARCH(B1,A1)))
SEARCH
函数获取单元格A1
中的值,尝试在单元格B1
中包含的字符串值中找到它。我说&#34;特里&#34;因为它可能会返回错误,如果它什么也没找到。
因此ISERR(SEARCH(...))
会检查错误并返回TRUE
(如果有),在这种情况下,这意味着单元格B1
中的velue与单元格A1
中的velue不匹配1}}。
最后,要将函数ISERR
的输出转换为您想要的布尔答案,我们通过执行NOT(ISERR(...))
来否定它。
检查列
B
中的每个字符串值是否为单元格A1
中的 ED
A B C
1 abc, cde | abc, 1234 abc, cde =NOT(ISERR(SEARCH($B1,$A$1)))
2 zyy | xww =NOT(ISERR(SEARCH($B2,$A$1)))
. ... ...
10 abc, 1234 =NOT(ISERR(SEARCH($B10,$A$1)))
返回单元格TRUE
中的C1
,单元格FALSE
中的C2
和单元格TRUE
中的C10
。
post scriptum :选择bioschaf的评论可以帮助您概括这个概念。
检查
B
列相邻单元格中字符串值<{1}}中每个单元格的字符串值是否为 ED < / I>
或者使用你的例子。
A
检查列
A B C 1 abc | cde abc =NOT(ISERR(SEARCH($B1,$A1))) 2 cde | bsd xxx =NOT(ISERR(SEARCH($B2,$A2))) 3 aaa | abc bsd =NOT(ISERR(SEARCH($B3,$A3)))
范围A
中的每个列B
的值是否为 ED ,使用数组公式
$B$1:$B$11
您可以从中删除 A B C
1 abc abc | cde =NOT(NOT(SUM(--NOT(ISERR(SEARCH($A1,$B$1:$B$11))))))
. ... ... ...
1000 aaa =NOT(NOT(SUM(--NOT(ISERR(SEARCH($A1000,$B$1:$B$11))))))
部分以查看出现次数而不是将其转换为布尔值。
检查每列
NOT(NOT(...))
的值是否包含 S 列B
列范围内的至少一个字符串值D
,使用数组公式
使用您在评论中提供的数据。并在评论中提到的列中显示它们,我们有
$D$2:$D$5
因此,如果我们想检查列 B C D
1
2 hardware|information services|information technology hardware
3 hardware mobile
4 apps|mobile 3d
5 computer
中的每个值是否包含在B
范围内某处写的字,我们可以做的是(比如E列) ):
D2:D5
通过按CTRL + SHIFT + ENTER,必须将上述每个公式都验证为 MATRIX-FORMULA 。这样做会呈现:
E
1
2 =NOT(NOT(SUM(--NOT(ISERR(SEARCH($D$2:$D$5,$B2))))))
4 =NOT(NOT(SUM(--NOT(ISERR(SEARCH($D$2:$D$5,$B3))))))
3 =NOT(NOT(SUM(--NOT(ISERR(SEARCH($D$2:$D$5,$B4))))))
5
在 E
1
2 TRUE
4 TRUE
3 TRUE
5
E2
我们有TRUE
,因为hardware|information services|information technology
包含单词hardware
,实际上位于D2
。
在E3
TRUE
我们hardware
hardware
包含(确切)单词D2
,实际上位于E4
。
在TRUE
apps|mobile
我们有mobile
,因为D3
包含单词isEmpty()
,实际上位于$persons->isEmpty();