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
(defparameter *problem-num* 10) | |
(if (> (length *args*) 0) (defparameter *problem-num* (parse-integer (car *args*)))) | |
(setf *random-state* (make-random-state t)) | |
(defun rand-elt (lst) (elt lst (random (length lst)))) | |
(defun rand-range (min max) (let ((r (random (- max min)))) (+ r min))) | |
(defun 1+rand (m) (1+ (random m))) | |
(defun divisor-lst (num mindiv maxdiv) | |
(let ((lst '())) | |
(do ((n mindiv (1+ n))) | |
((or (>= n num) |
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 <iostream> | |
#include <vector> | |
#include <map> | |
#include <climits> | |
using namespace std; | |
typedef pair<int, int> Edge; | |
typedef map<int, int> Vertex; | |
typedef vector<Vertex> Graph; |
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
# | |
#=Ruby Cheat Sheet for Beginner | |
# | |
################################################## | |
# 複数行コメント | |
################################################## | |
=begin | |
コメント |
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
# | |
#=Ruby Cheat Sheet for Beginner | |
# | |
################################################## | |
# 複数行コメント | |
################################################## | |
=begin | |
コメント |
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 Google Compute Engine Instance | |
$ gcloud deployment-manager deployments create app-server --config ./config/vm.yaml | |
# Connect to the instance | |
$ gcloud compute ssh app-server | |
# Create app-user | |
$ sudo adduser app-user | |
$ sudo usermod -a -G google-sudoers app-user |
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 React, { useEffect, useRef, useState } from "react"; | |
import mermaidAPI from "mermaid"; | |
type Props = { | |
divId: string; | |
children: string; | |
}; | |
export default function Mermaid({ children }: Props) { | |
const [html, setHtml] = useState<string>(""); |
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 Len<T extends any[]> = T["length"] | |
type _Add< | |
T, | |
N1 extends Number, | |
N2 extends Number, | |
Curr1 extends any[], | |
Curr2 extends any[] | |
> = Len<Curr1> extends N1 | |
? Len<Curr2> extends N2 |
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
[ | |
{ | |
"key": "ctrl+e", | |
"command": "cursorLineEnd", | |
"when": "terminalFocus" | |
} | |
] |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
//Faster linq-style convenience functions https://github.com/jackmott/LinqFaster | |
using JM.LinqFaster; | |
namespace DrawAndDrive | |
{ |
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
name: complex DAG3 | |
steps: | |
- name: "Initialize" | |
command: "sleep 1" | |
- name: "Copy TAB_1" | |
description: "Extract data from TAB_1 to TAB_2" | |
command: "sleep 1" | |
depends: | |
- "Initialize" | |
- name: "Update TAB_2" |
OlderNewer