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 ZipExtractor | |
| def initialize(source_path) | |
| @unzipped = false | |
| @source_path = source_path | |
| end | |
| ## | |
| # unzip the export and return the list of files in it | |
| def extracted_file_list | |
| unzip unless @unzipped |
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
| (gdb) display zigzag_array | |
| 1: zigzag_array = {"F\000A\000N\000\000\000\000\000", "OBROE\000\000\000\000\000", "O\000J\002S\000@\003\000\000@"} |
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
| version: "3.3" | |
| services: | |
| webserver: | |
| build: | |
| context: ./app_react | |
| args: | |
| - APP_HOST_URL=$APP_HOST_URL | |
| - APP_BACKEND_PORT=$APP_BACKEND_PORT | |
| ports: | |
| - 80:80 |
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
| version: "3.3" | |
| services: | |
| webserver: | |
| build: ./app_react | |
| ports: | |
| - 80:80 | |
| - 8080:8080 | |
| environment: | |
| - APP_NODE_URL=${APP_NODE_URL} | |
| nodeapp: |
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
| MAX = 2**31-1 | |
| MIN = -2**31 | |
| def reverse(x) | |
| negative = x < 0 | |
| reversed_x = x.to_s.reverse.to_i | |
| return 0 if reversed_x > MAX || reversed_x < MIN | |
| return -reversed_x if negative | |
| return reversed_x | |
| 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
| $ composer require --dev phalcon/incubator-test:^v1.0.0-alpha.1 | |
| ./composer.json has been updated | |
| Running composer update phalcon/incubator-test | |
| Loading composer repositories with package information | |
| Updating dependencies | |
| Your requirements could not be resolved to an installable set of packages. | |
| Problem 1 | |
| - codeception/codeception[1.0.9, ..., 1.0.10] require facebook/php-webdriver * -> could not be found in any version, there may be a typo in the package name. | |
| - codeception/codeception[1.1.5, ..., 1.8.7] require phpunit/phpunit 3.7.* -> found phpunit/phpunit[3.7.0, ..., 3.7.38] but it conflicts with your root composer.json require (^9.0). |
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, {useState, useEffect, useContext} from "react" | |
| import {Link} from "react-router-dom" | |
| import axios from "axios" | |
| import AppContext from "../../contexts/AppContext" | |
| import Card from "../Card" | |
| import EmployeeType from "../../types/EmployeeType" | |
| import CrudIndex from "../CrudIndex" | |
| const EmployeesCrudIndex = (props: any) => { |
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 MyComponent = function(props) { | |
| // does this get redefined each time MyComponent is rendered? And is that a significant performance loss? | |
| function doStuff() { | |
| ... | |
| } | |
| return ( | |
| <form onSubmit={doStuff}> | |
| ... |
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 TechnicianSelect = (props) => { | |
| const [technicians, setTechnicians] = useState([]) | |
| const [selectedIds, setSelectedIds] = useState([]) | |
| const [selectedOptions, setSelectedOptions] = useState([]) | |
| const [selectedOptionsLoaded, setSelectedOptionsLoaded] = useState(false) | |
| useEffect( () => { | |
| axios({ | |
| url: "/users.json?role=technician", | |
| method: "GET" |
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 { Route, Switch } from 'react-router-dom' | |
| import Home from "./Home" | |
| import Navigation from "./Navigation" | |
| import Quizzer from "./Quizzer" | |
| import Admin from "./Admin" | |
| import Login from "./Login" | |
| import Logout from "./Logout" | |
| import { CookiesProvider } from 'react-cookie'; |
NewerOlder