This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is the common field set free of country specific things. | |
| function GeneralInternationalAddress(props) { | |
| return ( | |
| <Fragment> | |
| <AddressLineInput value={props.address_line} /> | |
| <AddressLineInput | |
| name="address_line2" | |
| value={props.address_line2} | |
| optional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CountryAddressForm.js | |
| return ( | |
| <form | |
| className="country-form" | |
| action="#" | |
| method="post" | |
| onSubmit={this.handleSubmit.bind(this)} | |
| onChange={this.handleChange.bind(this)}> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CountryAddressForm.js | |
| render() { | |
| return ( | |
| <form action="#" | |
| onSubmit={this.handleSubmit.bind(this)} | |
| onChange={this.handleChange.bind(this)}> | |
| <CountrySelector name="country" countries={countries} /> | |
| <AddressLineInput name="address_line" value={this.state.address_line} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CountryAddressForm.js | |
| const COUNTRY_REGIONS = { IE:[], SP:[], IT:[] }; | |
| render() { | |
| return( | |
| <form action="#" | |
| onSubmit={this.handleSubmit.bind(this)} | |
| onChange={this.handleChange.bind(this)}> | |
| <CountrySelector name="country" countries={countries} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CountryAddressForm.js | |
| // Common most used address format | |
| // ... | |
| render() { | |
| return ( | |
| <form action="#" | |
| onSubmit={this.handleSubmit.bind(this)} | |
| onChange={this.handleChange.bind(this)}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/gob" | |
| "fmt" | |
| "log" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: cron.sh <your_command> <sleep_duration> | |
| while :; | |
| do | |
| clear | |
| date | |
| $1 | |
| sleep $2 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'test/unit' | |
| require_relative 'fizzbuzz.rb' | |
| class FizzBuzzTest < Test::Unit::TestCase | |
| def test_given_tree_it_should_print_fizz | |
| #given | |
| number = 3 | |
| expected = "Fizz" | |
| #when | |
| result = FizzBuzz.when(number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TestFeedCollectionHandler(FeedServerTestCase): | |
| headers = {'Content-Type': 'application/json'} | |
| def setUp(self): | |
| super(TestFeedCollectionHandler, self).setUp() | |
| self.data = {'uri': 'glb.com/minhaeditoria/', | |
| 'product': 'glb-feed', | |
| 'name': 'globo feed', | |
| 'images': {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub trait Command { | |
| fn execute(&self) -> String; | |
| } | |
| struct AddCmd; | |
| struct DeleteCmd; | |
| impl Command for AddCmd { | |
| fn execute(&self) -> String { "It add".into() } | |
| } |