<commit_before><?xml version="1.0"?>
<!-- Simple example to demonstrate the CreditCardValidator. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
        import mx.controls.Alert;
    </mx:Script>

	<!-- Define model for the credit card data. -->
    <mx:Model id="creditcard">
        <card>	
            <cardType>{cardTypeCombo.selectedItem.data}</cardType>
            <cardNumber>{cardNumberInput.text}</cardNumber>
        </card>
    </mx:Model>

    <mx:CreditCardValidator id="ccV" 
        cardTypeSource="{creditcard}" cardTypeProperty="cardType"
        cardNumberSource="{creditcard}" cardNumberProperty="cardNumber"
        trigger="{myButton}" triggerEvent="click"
        cardTypeListener="{cardTypeCombo}"
        cardNumberListener="{cardNumberInput}"
        valid="Alert.show('Validation Succeeded!');"/>
  
    <mx:Panel title="CreditCardValidator Example" width="75%" height="75%" 
        paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">

        <mx:Form id="creditCardForm">
            <mx:FormItem label="Card Type">    
                <mx:ComboBox id="cardTypeCombo">
                    <mx:dataProvider>
                        <mx:Object label="American Express" data="American Express"/>
                        <mx:Object label="Diners Club" data="Diners Club"/>
                        <mx:Object label="Discover" data="Discover"/>
                        <mx:Object label="MasterCard" data="MasterCard"/>
                        <mx:Object label="Visa" data="Visa"/>
                    </mx:dataProvider>
                </mx:ComboBox>
            </mx:FormItem>
            <mx:FormItem label="Credit Card Number">
                <mx:TextInput id="cardNumberInput"/>
            </mx:FormItem>
            <mx:FormItem>
                <mx:Button id="myButton" label="Check Credit"/>
            </mx:FormItem>
        </mx:Form> 	
		
    </mx:Panel>	
</mx:Application><commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after><?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the CreditCardValidator. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo">

    <fx:Script>
        import mx.controls.Alert;
    </fx:Script>

    <fx:Declarations>
        <!-- Define model for the credit card data. -->
        <fx:Model id="creditcard">
            <card>
                <cardType>{cardTypeCombo.selectedItem.data}</cardType>
                <cardNumber>{cardNumberInput.text}</cardNumber>
            </card>
        </fx:Model>

        <mx:CreditCardValidator id="ccV" 
                cardTypeSource="{creditcard}" cardTypeProperty="cardType"
                cardNumberSource="{creditcard}" cardNumberProperty="cardNumber"
                trigger="{myButton}" triggerEvent="click"
                cardTypeListener="{cardTypeCombo}"
                cardNumberListener="{cardNumberInput}"
                valid="Alert.show('Validation Succeeded!');"/>
    </fx:Declarations>

    <s:Panel title="CreditCardValidator Example"
            width="75%" height="75%"
            horizontalCenter="0" verticalCenter="0">
        <mx:Form id="creditCardForm" left="10" right="10" top="10" bottom="10">
            <mx:FormItem label="Card Type">
                <mx:ComboBox id="cardTypeCombo">
                    <mx:dataProvider>
                        <fx:Object label="American Express" data="American Express"/>
                        <fx:Object label="Diners Club" data="Diners Club"/>
                        <fx:Object label="Discover" data="Discover"/>
                        <fx:Object label="MasterCard" data="MasterCard"/>
                        <fx:Object label="Visa" data="Visa"/>
                    </mx:dataProvider>
                </mx:ComboBox>
            </mx:FormItem>
            <mx:FormItem label="Credit Card Number">
                <s:TextInput id="cardNumberInput"/>
            </mx:FormItem>
            <mx:FormItem>
                <s:Button id="myButton" label="Check Credit"/>
            </mx:FormItem>
        </mx:Form>
    </s:Panel>

</s:Application>
{'fraction_non_alphanumeric': 0.14521063779712873, 'fraction_numerical': 0.009178630265944928, 'mean_word_length': 2.143491124260355, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 2, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3026128', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1136, 'n_words': 203}