Skip to content

Instantly share code, notes, and snippets.

View mxdi9i7's full-sized avatar
:octocat:
Author of Vant-React and A.C.C.B. VSCE

Peter Zheng mxdi9i7

:octocat:
Author of Vant-React and A.C.C.B. VSCE
  • thirtymadison
  • New York
View GitHub Profile
m1 = [[1, 2, 3, 4], [4, 5, 6, 7], [7, 8, 9, 10], [15, 16, 17, 18]]
# write a for loop to display these numbers in this format: 1 2 3 4 5 6 7 8 9
# format: 3 2 1 6 5 4 9 8 7
# for..in
# for row in m1:
# for item in row:
@mxdi9i7
mxdi9i7 / index.js
Created June 30, 2022 23:36
Class OOP exercise JS
// const student = {
// firstName: 'John',
// lastName: 'Doe',
// age: 25,
// };
// class Student {
// constructor(firstName, lastName, age, teacherName) {
// this.firstName = firstName;
// this.lastName = lastName;
@mxdi9i7
mxdi9i7 / MenuMultiselect.tsx
Created September 27, 2021 17:31
Menu Multiselect for Headless+TailwindUI
import { IDishVariant, IModifierGroup } from '../../types';
import React, { useState, useRef, useEffect, forwardRef } from 'react';
import { Listbox, Transition } from '@headlessui/react';
import { CheckIcon, SelectorIcon } from '@heroicons/react/solid';
import classNames from 'classnames';
interface Props {
selectedList: any[];
data: any[];
label: string;
@mxdi9i7
mxdi9i7 / README.md
Created April 3, 2021 14:16
README.md

visitors

@mxdi9i7
mxdi9i7 / function.js
Created January 16, 2021 19:55
ES6 Function based OOP design
function Counter(startingCount) {
this.startingCount = startingCount;
this.count = this.startingCount;
this.increment = () => {
this.count = this.count + 1;
};
this.decrement = () => {
this.count = this.count - 1;
@mxdi9i7
mxdi9i7 / cxk.2.gif
Created June 4, 2019 00:28
scandal
cxk.2.gif