This file contains 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 Tkinter as tk | |
from Tkinter import N, S, E, W | |
import ttk | |
root = tk.Tk() | |
root.title("This is dumb") | |
root.grid() | |
student_name = tk.StringVar() | |
teacher_1_name = tk.StringVar() |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
#![allow(dead_code)] | |
fn double(x: &i32) -> i32{ | |
2*x | |
} | |
fn it_ex_1() { | |
let values: [i32; 3] = [1, 2, 3]; | |
let it = values.iter(); |
This file contains 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
open Lwt | |
open CamomileLibrary | |
let draw ui matrix = | |
(* let style = { LTerm_style.none with foreground = Some (LTerm_style.rgb 255 255 255) } in *) | |
let size = LTerm_ui.size ui in | |
let ctx = LTerm_draw.context matrix size in | |
LTerm_draw.draw_string ctx 2 2 "Hello, world!" | |
let rec loop ui = |
This file contains 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 <iomanip> | |
#include <string> | |
#include <map> | |
using namespace std; | |
map<string, int> m; | |
int n; | |
double trees; | |
string s; |
This file contains 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 <cstring> | |
#include <vector> | |
#include <string> | |
#include <sstream> | |
#include <algorithm> | |
using namespace std; | |
typedef vector<int> vi; |
This file contains 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 <algorithm> | |
using namespace std; | |
inline bool neighbors(int i, int j) { | |
int n = i^j; | |
return (n&(-n)) == n; | |
} |
This file contains 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> | |
using namespace std; | |
typedef long long ll; | |
#define maxn 1000 | |
ll N, n; |
This file contains 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 <utility> | |
#include <algorithm> | |
using namespace std; | |
vector< vector< pair<int, int> > > t; | |
int n, m; | |
int main() { |
This file contains 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 <queue> | |
using namespace std; | |
int n, x; | |
long long sum; | |
int main() { | |
while(cin >> n, n) { | |
sum = 0; | |
priority_queue<long long> q; |
OlderNewer