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
<?php | |
class MyClass { | |
private $logger; | |
public function __construct(LoggerInterface $logger) { | |
$this->logger = $logger; | |
} | |
public function send($message) { | |
return $this->logger->info($message); | |
} |
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
<?php | |
class MyClass { | |
private $logger; | |
public function setLogger(LoggerInterface $logger) { | |
$this->logger = $logger; | |
} | |
public function send($message) { | |
return $this->logger->info($message); | |
} |
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
<?php | |
class MyClass { | |
public $logger; | |
public function send($message) { | |
return $this->logger->info($message); | |
} | |
} | |
?> |
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
import numpy | |
import cv2 | |
imagen = cv2.imread("tacos.jpg") | |
cv2.imshow("ventana", imagen) | |
cv2.waitKey() |
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
<h2>Hero List</h2> | |
<p><i>Pick a hero from the list</i></p> | |
<ul> | |
<li *ngFor="let hero of heroes" (click)="selectHero(hero)"> | |
{{hero.name}} | |
</li> | |
</ul> | |
<app-hero-detail *ngIf="selectedHero" [hero]="selectedHero"></app-hero-detail> |
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
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<img src={logo} className="App-logo" alt="logo" /> |
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 SplitPane(props) { | |
return ( | |
<div className="SplitPane"> | |
<div className="SplitPane-left"> | |
{props.left} | |
</div> | |
<div className="SplitPane-right"> | |
{props.right} | |
</div> | |
</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 Dropdown extends Component { | |
state = { | |
isOpened: false, | |
} | |
handleClickOutside = () => { | |
this.toggle(); | |
} | |
toggle= () => { | |
this.setState({ isOpened: !this.state.isOpened }); |
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 Toggle extends Component { | |
state = { | |
on: false | |
} | |
toggle = () => { | |
this.setState(() => { | |
on: !this.state.on | |
}) | |
} | |
render() { |