added vscode extensions

This commit is contained in:
tomit4 2021-11-05 11:26:45 -07:00
parent 7cde0829be
commit 26e2a50441
316 changed files with 37301 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#include <iostream>
using namespace std;
int main()
{
int n1, n2;
cout << "Enter two numbers: ";
cin >> n1 >> n2;
while(n1 != n2)
{
if(n1 > n2)
n1 -= n2;
else
n2 -= n1;
}
cout << "HCF = " << n1;
return 0;
}

View file

@ -0,0 +1,14 @@
.cards {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
flex-direction: row;
max-height: 100vh;
}
.cards img {
margin: 10px;
border: 3px solid #000;
box-shadow: 3px 3px 8px 0px rgba(0, 0, 0, 0.3);
max-width: 23vw;
}

View file

@ -0,0 +1,18 @@
data Control
= Master [Text]
| Node
| Reset
deriving (Eq, Show)
instance Semigroup Control where
Reset <> _ = Node
_ <> Reset = Node
Node <> Node = Node
Node <> m@(Master _) = m
m@(Master _) <> Node = m
(Master m0) <> (Master m1) = Master (m0 <> m1)
-- hello
instance Monoid Control where
mempty = Node
mappend a b = a <> b

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous"
/>
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"
></script>
</body>
</html>

View file

@ -0,0 +1,26 @@
{
"env": {
"es6": true,
"mocha": true,
"node": true
},
"extends: "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes: [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}

View file

@ -0,0 +1,12 @@
class User {
constructor(name) {
this.name = name;
}
sayHi() {
alert(this.name);
}
}
let user = new User("Alex");
user.sayHi();

View file

@ -0,0 +1,15 @@
# Borealis Theme
> A Borealis theme for VS Code.
![Borealis](../images/borealis.png)
## Installation
1. Install [Visual Studio Code](https://code.visualstudio.com/)
2. Launch Visual Studio Code
3. Choose **Extensions** from menu
4. Search for `Borealis`
5. Click **Install** to install it
6. Click **Reload** to reload the Code
7. File > Preferences > Color Theme > **Borealis**

View file

@ -0,0 +1,13 @@
module Euler.Problem2 where
import Prelude
import Control.Lazy (defer)
import Data.Foldable (sum)
import Data.Int (even)
import Data.List.Lazy (List, filter, takeWhile, (:))
lazyFibList :: Int -> Int -> List Int
lazyFibList f1 f2 = f1 : defer \_ -> lazyFibList f2 (f1 + f2)
solution :: Int
solution = sum $ filter even $ takeWhile (_ < 4_000_000) $ lazyFibList 1 2

View file

@ -0,0 +1,8 @@
def SubFib(startNumber, endNumber):
for cur in F():
if cur > endNumber: return
if cur >= startNumber:
yield cur
for i in SubFib(10, 200):
print i

View file

@ -0,0 +1,25 @@
// src/components/Hello.tsx
import * as React from "react";
function Hello({ name, enthusiasmLevel }) {
if (enthusiasmLevel <= 0) {
throw new Error("You could be a little more enthusiastic. :D");
}
return (
<div className="hello">
<div className="greeting">
Hello {name + getExclamationMarks(enthusiasmLevel)}
</div>
</div>
);
}
export default Hello;
// helpers
function getExclamationMarks(numChars) {
return Array(numChars + 1).join("!");
}

View file

@ -0,0 +1,30 @@
// src/components/Hello.tsx
import * as React from "react";
export interface Props {
name: string;
enthusiasmLevel?: number;
}
function Hello({ name, enthusiasmLevel = 1 }: Props) {
if (enthusiasmLevel <= 0) {
throw new Error("You could be a little more enthusiastic. :D");
}
return (
<div className="hello">
<div className="greeting">
Hello {name + getExclamationMarks(enthusiasmLevel)}
</div>
</div>
);
}
export default Hello;
// helpers
function getExclamationMarks(numChars: number) {
return Array(numChars + 1).join("!");
}

View file

@ -0,0 +1,26 @@
{
"env": {
"es6": true,
"mocha": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}

View file

@ -0,0 +1,13 @@
language: node_js
node_js:
- "6"
install:
- npm install
script:
- npm test
after_script:
- npm run coveralls
notifications:
email:
on_success: never
on_failure: always