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
| # th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
| # Password: | |
| # psql (9.1.10, server 0.0.0) | |
| # WARNING: psql version 9.1, server version 0.0. | |
| # Some psql features might not work. | |
| # Type "help" for help. | |
| # | |
| # th30z=> select foo; | |
| # a | b | |
| # ---+--- |
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 org.example; | |
| import org.apache.calcite.adapter.jdbc.JdbcSchema; | |
| import org.apache.calcite.jdbc.CalciteConnection; | |
| import org.apache.calcite.plan.RelOptUtil; | |
| import org.apache.calcite.rel.RelNode; | |
| import org.apache.calcite.rel.RelRoot; | |
| import org.apache.calcite.schema.SchemaPlus; | |
| import org.apache.calcite.sql.SqlNode; | |
| import org.apache.calcite.sql.parser.SqlParseException; |
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 org.example; | |
| import org.apache.calcite.adapter.jdbc.JdbcSchema; | |
| import org.apache.calcite.jdbc.CalciteConnection; | |
| import org.apache.calcite.plan.RelOptUtil; | |
| import org.apache.calcite.rel.RelNode; | |
| import org.apache.calcite.rel.RelRoot; | |
| import org.apache.calcite.schema.SchemaPlus; | |
| import org.apache.calcite.sql.SqlNode; | |
| import org.apache.calcite.sql.parser.SqlParseException; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| /* | |
| #License: | |
| MIT. Copyrigh 2022 Victor "NegInfinity" Eremin. | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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
| #include <pthread.h> | |
| #include <stdatomic.h> | |
| #include <stdio.h> | |
| #ifndef N | |
| # define N 10000000 | |
| #endif | |
| // Spin-lock barrier for two threads. Initialize to zero. | |
| static void |
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
| /** | |
| * ``` | |
| * Does JDK8's Optional class satisfy the Monad laws? | |
| * ================================================= | |
| * 1. Left identity: true | |
| * 2. Right identity: true | |
| * 3. Associativity: true | |
| * | |
| * Yes, it does. | |
| * ``` |
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
| // simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon | |
| // Based on the work by @zhuowei | |
| // @imbushuo - Nov 2020 | |
| // To build: | |
| // Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF | |
| // Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON | |
| // ^ Per @never_released, tested on 11.0.1, idk why | |
| // clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c | |
| // codesign --entitlements simplevm.entitlements --force -s - simplevm |
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
| (* | |
| * This file can be executed by running: | |
| * $ ocaml -rectypes map-as-a-recursion-scheme.ml | |
| * | |
| *) | |
| open Printf | |
| (* |
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
| {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, TypeFamilies, TemplateHaskell #-} | |
| import Data.Functor.Foldable | |
| import Data.Functor.Foldable.TH | |
| import Data.Functor.Compose | |
| -- Example type | |
| data Exp | |
| = IntValue Int | |
| | Sum Exp Exp |
NewerOlder