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

寻求多次出现的表达式(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没有类”这个说法是正确的。 虽然JavaScript是面向对象的语言,但它不是基于类的语言 - 这是一种基于 原型的语言 。 这两种方法之间存在差异,但是由于可以像基于类的语言一样使用JavaScript,因此许多人(包括我自己)通常将构造函数简单地称为“类”。 Technically, the statement "JavaScript has no classes" is correct. Although JavaScript is object-oriented l ...
  • 您需要导出您定义的类。 例: //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)项目中定义包括无反应类的任何类并将其导出,使 ...
  • 使用Moment.js,您可以找到任意两个日期对象之间的差异(以毫秒为单位)。 let birthday = moment([1978,7,12]); let ageInMs = moment().diff(birthday); 这将为您提供这两个Moment对象之间的毫秒数。 您不需要知道在一些Moment数学中包含多少秒,分钟,小时或天。 let doubleMyAge = moment().add(ageInMs, 'ms'); 结果将是一个Moment对象,这是我现在的未来年龄,即从现在起很长一 ...
  • 我找不到一种方法来调用我正在加载到我的UIWebView中的html文档中定义的javascript函数(我不知道这是否,或者不可能)。 但是如果我没有使用单独的html文件,而是直接在我的目标c代码中创建的html字符串,我发现我可以实现我的目标。 我能够将变量传递给创建html字符串的函数,并且我也能够在html字符串中运行我的javascript。 这是我创建html字符串的方法: - (NSString *)htmlString:(NSString *)emailMessage { NSS ...
  • 如果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.
  • (我希望你通常在前面有一个var 。:-)如果没有一个,你就会成为隐形全球恐怖的牺牲品。) 除了明确之外,没有真正的惯例。 对我来说 ,“清楚”意味着一些事情: 将所有var语句放在范围的开头,因为无论如何它都是它们的真实位置 。 如果某些东西具有不会发生太大变化的重要结构,请尽早为其指定一个对象文字(如您所愿)。 ......但“清楚”对不同的人来说意味着不同的东西。 对于类中的本地数据成员的使用也是如此。 以ctor或其他集中方式(为了清晰)初始化所有这些是最佳做法吗? 是的,初始化构造函数中所有特定于 ...
  • 你不能用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.
  • 是。 它可能在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.
  • 批次应该是虚拟组件(不应该有任何外部访问) export default class Lot extends React.PureComponent { render() { return (
  • 您已将getUsername定义为async getUsername() { ... } 。 这意味着需要await结果,例如var usr = await this.getUsername(); 。 getPassword也是如此。 不幸的是,我不认为render功能可以是async因此您可能需要重新考虑一下您的方法。 我的建议是让你的组件满足缺失值(你可以返回null以不渲染任何东西),直到数据可用。 这个问题是使用ajax,但异步行为类似于你的问题,所以也许它可以帮助你。 I did these ch ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。