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
| LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}" | |
| CPATH=/usr/local/opt/openssl/include:"${CPATH}" | |
| PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}" | |
| export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH |
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 UIKit | |
| import AVFoundation | |
| var audioPlayer:AVAudioPlayer! | |
| class ViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
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 | |
| echo "\033[1;34m" | |
| cat << "EOF" | |
| ___ ____ _ _ ______ | |
| | \/ (_) | | (_) |___ / | |
| | . . |_ __ _ _ __ __ _| |_ _ ___ _ __ / / ___ _ __ ___ | |
| | |\/| | |/ _` | '__/ _` | __| |/ _ \| '_ \ / / / _ \| '_ \ / _ \ | |
| | | | | | (_| | | | (_| | |_| | (_) | | | | ./ /__| (_) | | | | __/ | |
| \_| |_/_|\__, |_| \__,_|\__|_|\___/|_| |_| \_____/\___/|_| |_|\___| |
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 axios from "axios"; | |
| class Posts extends Component { | |
| state = { | |
| posts: [] | |
| }; | |
| async componentDidMount() { | |
| const response = await axios.get("http://localhost:8000/posts"); |
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 axios from "axios"; | |
| const apiEndpoint = "http://localhost:8000"; | |
| class Posts extends Component { | |
| state = { | |
| posts: [] | |
| }; |
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 axios from "axios"; | |
| import { getPosts } from "../services/postService"; | |
| const apiEndpoint = "http://localhost:8000"; | |
| class Posts extends Component { | |
| state = { | |
| count: 0, | |
| next: "", |
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
| let mut s = String::from("hello world"); | |
| let r1 = &s; | |
| let r2 = &s; | |
| let r3 = &mut s; | |
| r3.push_str("Possible?"); |
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
| fn search_foo(s: &String, word: &'static str) -> &'static str { | |
| for (i, item) in s.chars().enumerate() { | |
| if &s[i..i+3] == word { | |
| return word | |
| } | |
| } | |
| "" | |
| } |
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
| fn first_blank_finder(s: &String) -> Option<usize> { | |
| let bytes = s.as_bytes(); | |
| for (i, &item) in bytes.iter().enumerate() { | |
| if item == b' ' { | |
| return Some(i) | |
| } | |
| } | |
| Some(0 as usize) | |
| } |
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
| fn first_blank_finder(s: &String) -> Option<usize> { | |
| let bytes = s.as_bytes(); | |
| for (i, &item) in bytes.iter().enumerate() { | |
| if item == b' ' { | |
| Some(i) | |
| } | |
| } | |
| Some(0 as usize) | |
| } |