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" | |
| "image" | |
| "image/color" | |
| "os" | |
| "runtime" | |
| "github.com/disintegration/imaging" |
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 reverse(x int) int { | |
| k := 1 | |
| if x < 0 { | |
| k = -1 | |
| x *= k | |
| } | |
| limit := 2147483648 |
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 isPalindrome(x int) bool { | |
| isPalindrome := false | |
| reverse := 0 | |
| v := x | |
| if x < 0{ | |
| return isPalindrome | |
| } | |
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( | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| ) | |
| //Index Request | |
| func Index(w http.ResponseWriter, r *http.Request) { | |
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
| mkMRZ = async () => { | |
| let logged = this.state.logged ||{} | |
| console.log(logged) | |
| // <!--- BEGIN ICAO DATA --> | |
| let fn = logged.fn | |
| let mn = logged.mn | |
| let sn = logged.sn |
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
| 'use strict'; | |
| a = 2 + 2; // causes an error (a is not defined) | |
| var a = 01; // causes an error | |
| // Assignment to a non-writable global | |
| var undefined = 5; // throws a TypeError | |
| var Infinity = 5; // throws a TypeError | |
| // Assignment to a non-writable property | |
| var obj1 = {}; |
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 as np | |
| # The admission fee at a small fair is $1.50 for children and $4.00 for aduits. On a certain day. 2200 people enter the fair and $5050 is collected. How many children and how many adult attended? | |
| # Let: X1 = number of childer, X2= number of adult | |
| # thus: | |
| # X1 + X2 = 2200 | |
| # 1.5X1 + 4X2 = 5050 | |
| # (1 1) (X1) = (2200) |
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
| var inquirer = require('inquirer'); | |
| var chalkPipe = require('chalk-pipe'); | |
| var { Timer } = require('easytimer.js'); | |
| var counter = 0; | |
| wrong = 0; | |
| var timer = new Timer(); | |
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 Todos from './Todos'; | |
| import Enzyme, {shallow, mount, render} from 'enzyme' | |
| import Adapter from 'enzyme-adapter-react-16'; | |
| Enzyme.configure({ adapter: new Adapter() }); | |
| window.fetch = jest.fn() | |
| .mockImplementationOnce(() => ({ | |
| status: 200, |
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'; | |
| class TodoList extends Component { | |
| constructor(props) { | |
| super(props) | |
| } | |
| render() { | |
| const todos = this.props.todos ? this.props.todos : [] | |
| return ( |