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
1.12.14.0/23 | |
1.12.32.0/23 | |
1.14.0.0/15 | |
1.44.96.0/24 | |
1.116.0.0/15 | |
1.178.32.0/19 | |
1.247.4.0/24 | |
1.255.30.0/24 | |
2.56.8.0/23 | |
2.56.16.0/22 |
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
# We create a container class. We only store the product's name at instantiation | |
class Container | |
attr :product_name | |
def initialize(name) | |
@product_name = name | |
end | |
end |
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 Shipment | |
define_method :cancel do |reason| | |
@cancelled = true | |
puts reason | |
end | |
end |
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
s = Shipment.new | |
if s.respond_to?(:tracking_code) | |
s.send(:tracking_code, '123ABC') # or s.send('cancel_shipping', '123ABC') | |
else | |
puts "Tracking code is not available." | |
end |
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
s = Shipment.new | |
if s.respond_to?(:cancel_shipping) | |
s.cancel_shipping | |
else | |
puts "Oh no ! Shipment cannot be cancel." | |
end |
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 Shipment | |
def prepare_for_delivery | |
@message = 'Shipment is prepared for delivery' | |
end | |
def tracking_code(code) | |
@tracking_code = code | |
end |
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
function MyComponent() { | |
const [counter, setCounter] = useState(0) | |
return(<div />) | |
} |
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 MyComponent extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
counter: 0 | |
} | |
} | |
render() { | |
return(<div/>) |
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
<div> | |
<p v-for="student in students">{{ student }}</p> | |
</div> |
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
return ( | |
<div> | |
{students.map(student => <p>{student}</p>)} | |
</div> | |
) |
NewerOlder