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
<template> | |
<div :class="wrapperClass" v-bind="attrs"> | |
<table :class="['relative overflow-x-auto', 'divide-y divide-gray-300 dark:divide-gray-700']"> | |
<thead class=""> | |
<tr class=""> | |
<th v-if="modelValue" scope="col" :class="['ps-4']"> | |
<input type="checkbox" :checked="indeterminate || selected.length === rows.length" @change="onChange" /> | |
</th> | |
<th v-for="(column, index) in columns" :key="index" scope="col" class="" |
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
function useTraceUpdate(props: { [s: string]: unknown } | ArrayLike<unknown>) { | |
const prev = useRef(props); | |
useEffect(() => { | |
const changedProps = Object.entries(props).reduce((ps, [k, v]) => { | |
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
// @ts-ignore TODO: fix this | |
if (prev.current[k] !== v) { | |
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
// @ts-ignore TODO: fix this | |
ps[k] = [prev.current[k], v]; |
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
{ | |
// Git | |
"git.autofetch": true, | |
// Disable telemetry | |
"telemetry.telemetryLevel": "off", | |
// Zen mode | |
"zenMode.fullScreen": false, | |
"zenMode.hideTabs": true, | |
"zenMode.centerLayout": true, |
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 { schema } from '~/graphql/index'; | |
import { Context, createGraphQLContext } from '~/graphql/builder'; | |
import { | |
getGraphQLParameters, | |
processRequest, | |
renderGraphiQL, | |
shouldRenderGraphiQL, | |
} from 'graphql-helix'; | |
import { NextApiHandler } from 'next'; | |
import { ExecutionResult, GraphQLError } from 'graphql'; |
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
// create me a api server that returns users | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strconv" | |
"strings" | |
"time" |
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 CMP330.controller; | |
import CMP330.Utils.DateFns; | |
import CMP330.Utils.UserSingleton; | |
import CMP330.database.CustomerService; | |
import CMP330.database.UserService; | |
import CMP330.gui.WindowManager; | |
import CMP330.model.Customer; | |
import CMP330.model.User; | |
import com.google.inject.Inject; |
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 CMP330.Database; | |
import CMP330.Models.User; | |
import CMP330.Utils.DateFns; | |
import com.j256.ormlite.dao.Dao; | |
import com.j256.ormlite.support.ConnectionSource; | |
import java.sql.SQLException; | |
import java.text.DateFormat; |
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 CMP330.Models; | |
import com.j256.ormlite.field.DatabaseField; | |
import com.j256.ormlite.table.DatabaseTable; | |
import lombok.Getter; | |
import lombok.Setter; | |
@DatabaseTable(tableName = "tblCustomers") | |
public class Customer { |