select emn.aar as year, emn.terminkode as term, count(*) as evaluted_courses, emn_total.total_courses
from emne_liste emn,
(select str.kode, CAST(LEFT(rap.filnavn, 4) as INTEGER) year
from rapport rap, struktur str
where rap.struktur_id = str.struktur_id) eval,
(select aar, terminkode, count(*) as total_courses
from emne_liste
GROUP BY aar, terminkode) emn_total
where emn.emnekode = eval.kode
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 Layout from '../../components/layout' | |
import { getAllPostIds, getPostData } from '../../lib/posts' | |
import Head from 'next/head' | |
import Date from '../../components/date' | |
import utilStyles from '../../styles/utils.module.css' | |
/** | |
* @param {import('next').InferGetStaticPropsType<typeof getStaticProps> } props | |
*/ | |
export default function Post(props) { |
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
type Middleware = ( | |
query: any, | |
next: (query: any) => Promise<any>, | |
) => Promise<any> | |
class Client { | |
middlewares: Middleware[] = [] | |
async query(query) { | |
return this.buildQuery(query, this.middlewares.slice()) | |
} |
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 callsite from 'callsite' | |
export function isGraphQLStack() { | |
const stack = callsite() | |
const functions = stack.map(s => s.getFunctionName()) | |
return ( | |
functions.includes('resolveFieldsValueOrError') && | |
functions.includes('resolveField') && | |
functions.includes('executeFields') |
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 { GraphQLSchema } from 'graphql' | |
import polka from 'polka' | |
import { json } from 'body-parser' | |
import send from '@polka/send-type' | |
import { renderPlaygroundPage } from 'graphql-playground-html' | |
import { graphql } from 'graphql' | |
import { Server } from 'http' | |
export function serveGraphql(schema: GraphQLSchema): Server { | |
const { PORT = 4000 } = process.env |
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
{ | |
"datamodel": { | |
"enums": [], | |
"models": [ | |
{ | |
"name": "User", | |
"isEmbedded": false, | |
"dbName": null, | |
"fields": [ | |
{ |
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
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -sa terminal-overrides ",*:dim=\\E[2m" | |
set -g default-terminal "screen-256color" | |
# Keep your finger on ctrl, or don't | |
bind ^D detach-client |
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
# Ring the bell if any background window rang a bell | |
set -g bell-action any | |
# Default termtype. If the rcfile sets $TERM, that overrides this value. | |
set -sa terminal-overrides ",*:dim=\\E[2m" | |
set -g default-terminal "screen-256color" | |
# Keep your finger on ctrl, or don't | |
bind ^D detach-client |
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
#!/bin/bash | |
# | |
# Prisma Node.JS packages publish script | |
# | |
# Build Order | |
# prisma-client-lib | |
# prisma-generate-schema | |
# prisma-db-introspection |
NewerOlder