This file contains 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 participants from "./participants.json" | |
import nodemailer from "nodemailer" | |
interface ParticipantProps { | |
name: string; | |
email: string; | |
not?: string[]; | |
} | |
interface ParticipantsSortedProps extends ParticipantProps { |
This file contains 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 participants from "./participants.json" | |
interface ParticipantProps { | |
name: string; | |
email: string; | |
not?: string[]; | |
} | |
class AmigoSecreto { | |
shuffle(array: ParticipantProps[]): ParticipantProps[] { |
This file contains 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
[ | |
{ | |
"id":"0", | |
"tipo":"0", | |
"name":"Escolha um veículo", | |
"key":"choose" | |
}, | |
{ | |
"id":"1", | |
"tipo":"1", |
This file contains 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 {useEffect, useState} from "react"; | |
function App() { | |
const [value, setValue] = useState(""); | |
useEffect(() => { | |
window.addEventListener('keydown', (e) => handleKeyDown(e)); | |
return () => { | |
window.removeEventListener('keydown', (e) => handleKeyDown(e)); |
This file contains 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 com.kingaspx.util.BrowserUtil; | |
import com.kingaspx.version.Version; | |
import com.teamdev.jxbrowser.chromium.Browser; | |
import com.teamdev.jxbrowser.chromium.BrowserContext; | |
import com.teamdev.jxbrowser.chromium.BrowserContextParams; | |
import com.teamdev.jxbrowser.chromium.BrowserPreferences; | |
import com.teamdev.jxbrowser.chromium.events.ConsoleEvent; | |
import com.teamdev.jxbrowser.chromium.events.TitleEvent; | |
import com.teamdev.jxbrowser.chromium.swing.BrowserView; | |
import java.awt.BorderLayout; |
This file contains 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
public Menu() { | |
initComponents(); | |
initWebcam(); | |
} |
This file contains 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
private void initWebcam() { | |
Dimension size = WebcamResolution.QVGA.getSize(); | |
//Onde está escrito "QVGA" é a qualidade, | |
//você pode setar desde 4k, até a menor qualidade existente. | |
//para procurar todas as opções, basta apertar CTRL+Espaço | |
//depois de WebcamResolution. | |
webcam = Webcam.getWebcams().get(0); //0 é a câmera padrão | |
webcam.setViewSize(size); |
This file contains 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
@Override | |
public void run() { | |
do { | |
try { | |
Thread.sleep(100); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
Result result = null; |
This file contains 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
@Override | |
public Thread newThread(Runnable r) { | |
Thread t = new Thread(r, "My Thread"); | |
t.setDaemon(true); | |
return t; | |
} |
This file contains 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
public class Menu extends javax.swing.JFrame implements Runnable, ThreadFactory { | |
private WebcamPanel panel = null; | |
private Webcam webcam = null; | |
private static final long serialVersionUID = 6441489157408381878L; | |
private Executor executor = Executors.newSingleThreadExecutor(this); |
NewerOlder