Skip to content

Instantly share code, notes, and snippets.

View CEOehis's full-sized avatar
🏠
Working from home

Celestine Ekoh-Ordan CEOehis

🏠
Working from home
View GitHub Profile
Email: 982092332@qq.com
SN: GAWAE-FCWQ3-P8NYB-C7GF7-NEDRT-Q5DTB-MFZG6-6NEQC-CRMUD-8MZ2K-66SRB-SU8EW-EDLZ9-TGH3S-8SGA

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@CEOehis
CEOehis / react_formik_yup_checkbox_validation.md
Created January 20, 2021 12:24 — forked from mrtony/react_formik_yup_checkbox_validation.md
React formik yup checkbox, radio button validation
import "./formik-demo.css";
import React from "react";
import { render } from "react-dom";
import { Formik, Field } from "formik";
import Yup from "yup";
import classNames from "classnames";

// Input feedback
/*
Problem:
Given a singly linked list and an integer k, remove the kth last element from the list. k is guaranteed to be smaller than the length of the list.
The list is very long, so making more than one pass is prohibitively expensive.
Do this in constant space and in one pass.
*/
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>Stylight Currency Converter</header>
<section>
<span>
const DEFAULT_CURRENCY = 'EUR';
const baseURL = 'http://data.fixer.io/api';
const accessToken = 'xxxxxxx';
const currencySymbols = ['USD', 'EUR', 'JPY'];
const symbolsAPIUrl = `${baseURL}/latest?access_key=${accessToken}&symbols=${currencySymbols.join(',')}&format=1`;
const sourceInput = document.getElementById('source');
const targetInput = document.getElementById('target');
import React from 'react';
import { shallow } from 'enzyme';
import DropdownSelect from '../DropdownSelect';
describe('<DropdownSelect />', () => {
const choices = ['manager', 'associate'];
const onChange = () => {};
it('renders fine', () => {
const wrapper = shallow(<DropdownSelect value="" size="245px" choices={choices} onChange={onChange} />);
expect (wrapper).toMatchSnapshot();

TIL

Blob: means Binary Larg Object. A blob is a lob(large object) type. A log is used to hold larges strings that do not necessarily fit in memory.

BLOB: Binary Large Object CLOB: Character Large Object

import java.util.Arrays;
/**
*
*
* Simple class for benchmarking some sorting algorithms
*/
public class BenchMarker {
final static int ARRAY_SIZE = 100_000;

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?