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
| func Connect(w http.ResponseWriter, r *http.Request) { | |
| // create new WhatsApp connection | |
| cmd := exec.Command("./whats-cli", "connect") | |
| stdout, _ := cmd.StdoutPipe() | |
| err := cmd.Start() | |
| if err != nil { | |
| responses.ERROR(w, http.StatusInternalServerError, err) | |
| } |
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 ( | |
| "fmt" | |
| "github.com/jsdaniell/whats_api/api" | |
| "github.com/jsdaniell/whats_api/api/utils/file_utility" | |
| "github.com/jsdaniell/whats_api/api/utils/shell_commands" | |
| ) | |
| 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
| func Connect(w http.ResponseWriter, r *http.Request) { | |
| wac, err := whatsapp.NewConn(20 * time.Second) | |
| if err != nil { | |
| fmt.Fprintf(os.Stderr, "error creating connection: %v\n", err) | |
| } | |
| err = whats_utils.Login(wac) | |
| if err != nil { | |
| fmt.Fprintf(os.Stderr, "error logging in: %v\n", err) | |
| } |
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
| const dataToFilter = ['Blue', 'White', 'Red', 'Yellow']; | |
| let filteredBlueItem = dataToFilter.find(item => item === 'Blue'); | |
| console.log(filteredBlueItem) | |
| // Blue | |
| let filteredBlackItem = dataToFilter.find(item => item === 'Black'); |
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, { Fragment } from "react"; | |
| import ReactDOM from "react-dom"; | |
| import MUIDataTable from "mui-datatables"; | |
| class Example extends React.Component { | |
| render() { | |
| const columns = ["Name", "Title", "Location"]; | |
| const data = [ | |
| ["Gabby George", "Business Analyst", "Minneapolis"], |
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, { Fragment } from "react"; | |
| import ReactDOM from "react-dom"; | |
| import MUIDataTable from "mui-datatables"; | |
| class Example extends React.Component { | |
| render() { | |
| const columns = ["Name", "Title", "Location", "Age", "Salary"]; | |
| const data = [ | |
| ["Gabby George", "Business Analyst", "Minneapolis", 30, 100000], |
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, { Fragment } from "react"; | |
| import ReactDOM from "react-dom"; | |
| import MUIDataTable from "mui-datatables"; | |
| class Example extends React.Component { | |
| state = { | |
| searchText: "Computer" | |
| }; | |
| render() { |
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 from "react"; | |
| import ReactDOM from "react-dom"; | |
| import FormControlLabel from "@material-ui/core/FormControlLabel"; | |
| import TextField from "@material-ui/core/TextField"; | |
| import Switch from "@material-ui/core/Switch"; | |
| import MUIDataTable from "mui-datatables"; | |
| import Cities from "./cities"; | |
| class Example extends React.Component { | |
| render() { |
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 from "react"; | |
| import ReactDOM from "react-dom"; | |
| import FormControlLabel from "@material-ui/core/FormControlLabel"; | |
| import TextField from "@material-ui/core/TextField"; | |
| import Switch from "@material-ui/core/Switch"; | |
| import MUIDataTable from "mui-datatables"; | |
| import Cities from "./cities"; | |
| class Example extends React.Component { | |
| constructor(props) { |
NewerOlder