psql db_name
Connecting to Database\df+
View tables\du
View users\q
: Quit/Exit\c __database__
: Connect to a database\d __table__
: Show table definition including triggers\l
: List databases\dy
: List events\df
: List functions
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> | |
using namespace std; | |
int main(){ | |
for(int i=0; i<1000000; i++){ | |
cout << i*i << endl; | |
} | |
} |
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 <stdio.h> | |
int main() | |
{ | |
int num; | |
int squares; | |
int count; | |
// for loop terminates when n is less than count | |
for(count = 0; count < 1000000; count++) | |
{ |
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 std::env; | |
use std::fs; | |
fn main() { | |
// --snip-- | |
println!("In file {}", "Hello.txt"); | |
let contents = fs::read_to_string("Hello.txt") | |
.expect("Something went wrong reading the file"); |
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 <stdio.h> | |
#include <stdlib.h> | |
int main(){ | |
FILE *fPointer; | |
fPointer = fopen("Hello.txt","r"); | |
char singleLine[150]; | |
while(!feof(fPointer)){ | |
fgets(singleLine,150,fPointer); | |
puts(singleLine); |
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
\documentclass[]{standalone} | |
\usepackage{xcolor} | |
\usepackage{pgfplots} | |
\begin{document} | |
\begin{tikzpicture} | |
\begin{axis}[ytick={0,1,2,3,4,5,6,7,8,9,10},yticklabels={$0$,$1$,$2$,$3$,$4$,$5$,$6$,$7$,$8$,$9$,$10$},ylabel={$KWH$}, xtick={0,1,2,3,4,5,6,7,8,9,10},xticklabels={$0$,$1$,$2$,$3$,$4$,$5$,$6$,$7$,$8$,$9$,$10$},xlabel={$Timer$}] | |
\addplot[smooth, mark=*] coordinates {(0,0) | |
(1,6) | |
(1.5,6) | |
(2,3) |
NewerOlder