寻求多次出现的表达式(Seeking for more than one occurrence of an expression)

如何在foxpro中搜索多个基于索引键的匹配项? 我想在ctwdl表中存在subdir字段匹配的所有行中将表dlchosen字段更改为T 对于ctw所有行,将重复此匹配搜索。 dl具有相等subdir值的记录不按顺序排序。

目前,代码退出第17行的文件结尾遇到消息, do while not eof()嵌套循环,在chosenT对于仅匹配ctw的第一个subdir值的dl记录。

select 0
use ctw

select 0
use dl
index on subdir to subdir.idx 

select ctw

do while .not. eof() 

    select dl 
    seek ctw -> subdir

    if found()
        do while not eof() 
            replace chosen with .t. for ctw -> subdir = dl -> subdir
            skip
        enddo
    endif

    select ctw 
    skip 
enddo

How can I search for more than occurrence of index key based matches in foxpro? I want to change the chosen field in table dl to T for all rows where there exists a subdirfield match in ctw and dl tables. This matching search is to be repeated for all rows within ctw. The records in dl with equal subdir values are not ordered sequentially.

Currently, the code exits with end of file encountered message on line 17 do while not eof() nested loop after changing chosen to T for dl records that match only the first subdir value of ctw.

select 0
use ctw

select 0
use dl
index on subdir to subdir.idx 

select ctw

do while .not. eof() 

    select dl 
    seek ctw -> subdir

    if found()
        do while not eof() 
            replace chosen with .t. for ctw -> subdir = dl -> subdir
            skip
        enddo
    endif

    select ctw 
    skip 
enddo

原文:https://stackoverflow.com/questions/35093567
2024-05-06 12:05

满意答案

批次应该是虚拟组件(不应该有任何外部访问)

export default class Lot extends React.PureComponent {

    render() {
        return (
            <TouchableHighlight
                onPress={this.props.onPress} // <== CHANGED
            >
                <View style={{ flex: 1, height: 150, alignItems: 'center', justifyContent: 'center' }}>
                    <View>
                        {this.props.active && (<Image source={images[this.props.index]} style={[styles.images]} />)}
                    </View>

                 </View>

            </TouchableHighlight>
        );
    }
}

主屏幕

<FlatList
    data={this.state.lots}
    renderItem={({ item }) => <Lot {...item} onPress={() => this.props.navigate('LotView')} />} //<== CHANGED
/>

Lot should be dummy component (should not have any external access)

export default class Lot extends React.PureComponent {

    render() {
        return (
            <TouchableHighlight
                onPress={this.props.onPress} // <== CHANGED
            >
                <View style={{ flex: 1, height: 150, alignItems: 'center', justifyContent: 'center' }}>
                    <View>
                        {this.props.active && (<Image source={images[this.props.index]} style={[styles.images]} />)}
                    </View>

                 </View>

            </TouchableHighlight>
        );
    }
}

HomeScreen

<FlatList
    data={this.state.lots}
    renderItem={({ item }) => <Lot {...item} onPress={() => this.props.navigate('LotView')} />} //<== CHANGED
/>

相关问答

更多

JavaScript有类吗?(Does JavaScript have classes?)

从技术上说,“JavaScript没有类”这个说法是正确的。 虽然JavaScript是面向对象的语言,但它不是基于类的语言 - 这是一种基于 原型的语言 。 这两种方法之间存在差异,但是由于可以像基于类的语言一样使用JavaScript,因此许多人(包括我自己)通常将构造函数简单地称为“类”。 Technically, the statement "JavaScript has no classes" is correct. Although JavaScript is object-orien...

react-native:如何定义一个javascript类(react-native : How to define a javascript class)

您需要导出您定义的类。 例: //myClass.js export default class myClass { email: string; name: string; constructor() { //... } } //index.ios.js import myClass from './path/to/myClass.js' 请注意“导出默认值”,因此您可以在React Native(或Javascript es6)项目中定义包括无反应类的任何类并将...

如何在JavaScript中添加,增加本机时间变量(How to add, increment native Time variables in JavaScript)

使用Moment.js,您可以找到任意两个日期对象之间的差异(以毫秒为单位)。 let birthday = moment([1978,7,12]); let ageInMs = moment().diff(birthday); 这将为您提供这两个Moment对象之间的毫秒数。 您不需要知道在一些Moment数学中包含多少秒,分钟,小时或天。 let doubleMyAge = moment().add(ageInMs, 'ms'); 结果将是一个Moment对象,这是我现在的未来年龄,即从现...

使用Native iOS App中的变量调用Javascript函数(Calling Javascript Function With Variables from Native iOS App)

我找不到一种方法来调用我正在加载到我的UIWebView中的html文档中定义的javascript函数(我不知道这是否,或者不可能)。 但是如果我没有使用单独的html文件,而是直接在我的目标c代码中创建的html字符串,我发现我可以实现我的目标。 我能够将变量传递给创建html字符串的函数,并且我也能够在html字符串中运行我的javascript。 这是我创建html字符串的方法: - (NSString *)htmlString:(NSString *)emailMessage { ...

如何使用其他类的变量?(How to use variables from other classes?)

如果a是Class1类型的变量,则它被实例化,并且可以在Class2中访问它 if (a.yes) { do_this(); } 应该做的伎俩。 Provided a is a variable of type Class1, it is instantiated and it is accessible in Class2 simple if (a.yes) { do_this(); } should do the trick.

javascript样式 - 我应该定义变量/类吗?(javascript style - should I define variables/classes?)

(我希望你通常在前面有一个var 。:-)如果没有一个,你就会成为隐形全球恐怖的牺牲品。) 除了明确之外,没有真正的惯例。 对我来说 ,“清楚”意味着一些事情: 将所有var语句放在范围的开头,因为无论如何它都是它们的真实位置 。 如果某些东西具有不会发生太大变化的重要结构,请尽早为其指定一个对象文字(如您所愿)。 ......但“清楚”对不同的人来说意味着不同的东西。 对于类中的本地数据成员的使用也是如此。 以ctor或其他集中方式(为了清晰)初始化所有这些是最佳做法吗? 是的,初始化构造函数中...

将函数添加到php本机类?(Adding functions to php native classes?)

你不能用PHP做到这一点。 您只能从现有类继承 (如果它们不是最终的 )并将方法添加到子类。 You can't do that in PHP. You can only inherit from the existing classes (if they're not final) and add methods to the subclasses.

可以远程响应本机使用JavaScript吗?(can React native use JavaScript remotely?)

是。 它可能在React Native中没有App版本的情况下更新新的UI。 我们需要使用react-native-code-push库来启用动态应用更新。 Yes. Its possible to update new UI without App release in React Native. We need to use react-native-code-push library to enable dynamic app update.

在JavaScript类之间响应本地变量(React Native variables between JavaScript classes)

批次应该是虚拟组件(不应该有任何外部访问) export default class Lot extends React.PureComponent { render() { return ( <TouchableHighlight onPress={this.props.onPress} // <== CHANGED > <View style={{ flex...

如何在Javascript或React Native中形成uri字符串?(How to form a uri string in Javascript or in React Native?)

您已将getUsername定义为async getUsername() { ... } 。 这意味着需要await结果,例如var usr = await this.getUsername(); 。 getPassword也是如此。 不幸的是,我不认为render功能可以是async因此您可能需要重新考虑一下您的方法。 我的建议是让你的组件满足缺失值(你可以返回null以不渲染任何东西),直到数据可用。 这个问题是使用ajax,但异步行为类似于你的问题,所以也许它可以帮助你。 I did the...

相关文章

更多

揭开正则表达式的神秘面纱

正则表达式(regular expression)就是用一个“字符串”来描述一个特征,然后去验证另一个 ...

代码之谜(二)- 语句与表达式(每个表达式都有一个值)

虽然文章标题是『语句与表达式』,在这篇文章中,我将陈述一个观点 每个表达式都有一个值。 在此之外,也会 ...

JAVA 正则表达式教程(超详细)三(续)

匹配的模式(Pattern flags) compile( )方法还有一个版本,它需要一个控制正则表达 ...

JAVA 正则表达式教程(超详细)二(续)

第二点是,在本地号码位的前三位和后四位数字间有可能是空格符,而不是连字号,更有胜者,或根本就没有分隔符 ...

Hadoop实现共同出现的单词(Word co-occurrence)

Hadoop实现共同出现的单词(Word co-occurrence)是指在一个句子中相邻的两个单词。 ...

【第五章】Spring表达式语言 之 5.1 概述 5.2 SpEL基础 ——跟我学spring3

Spring表达式语言全称为“Spring Expression Language”,缩写为“SpEL ...

【第五章】Spring表达式语言 之 5.3 SpEL语法 ——跟我学spring3

5.3 SpEL语法5.3.1 基本表达式一、字面量表达式: SpEL支持的字面量包括:字符串、数 ...

【第五章】Spring表达式语言 之 5.4在Bean定义中使用EL—跟我学spring3

SpEL支持在Bean定义时注入,默认使用“#{SpEL表达式}”表示,其中“#root”根对象默认可 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本