Skip to content

Instantly share code, notes, and snippets.

View injust90's full-sized avatar
🎯
Focusing

Justin Chou injust90

🎯
Focusing
View GitHub Profile
* *
* *
* *
*
asdf two
while c = EOF
if (c >= 'a' && c <= 'z')
{
// Exercise 1-13 Write a program to print a histogram of the lengths of words in its input. It is easy to draw the historgram with the bars horizontal, a vertical orientation is more challenging.
#include <stdio.h>
#define IN 1
#define OUT 0
int main()
{
int c;
int wordCount = 0;
call plug#begin()
Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }
Plug 'sainnhe/everforest'
call plug#end()
set background=dark
colorscheme everforest
#define IN 1
#define OUT 0
int main() {
int state = IN;
int c, counter = 0;
while ((c = getchar()) != EOF) {
if (c == ' ' || c == '\n' || c == '\t') {
state = OUT;
#define IN 1
#define OUT 0
// count lines, words, and characters in input
#include <stdio.h>
int main()
{
int state, c, counter;
state = IN;
@injust90
injust90 / looper.verse
Created April 17, 2024 04:29
Loop through players
CheckForFlag()<suspends>:void=
loop:
Sleep(1.0)
AllPlayers:=GetPlayspace().GetPlayers()
for(Player:AllPlayers):
# this casts to the player object to get an agent
if(IsAgent:agent = agent[Player]):
if(ConditionalButton.IsHoldingItem[IsAgent]):
class_granter.ChangeClass(IsAgent)
else:
#include <stdio.h>
#define MAXLINE 1000
/* copy input to output; 2nd */
main ()
{
int len;
int max;
char line [MAXLINE];
char longest [MAXLINE];
#OBJS specifies which files to compile as part of the project
OBJS = main.cpp
#CC Specifies which compiler we're using
CC = g++
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppressess all warnings
COMPILER_FLAGS = -w
syntax enable
" https://github.com/sainnhe/everforest
colorscheme everforest
set background=dark
set guifont=Source_Code_Pro_SemiBold:h12
set guicursor+=a:blinkon0
set guioptions-=m
set guioptions-=T
set guioptions -=r
@injust90
injust90 / diagonal_algorithm.cpp
Last active December 26, 2022 21:42
Cross counting X pattern in a vector
#include <iostream>
#include <vector>
using namespace std;
// Defining rows and columns of
// vector of vectors
int main()
{
int diagonalRight = 0;