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
class Stack { | |
constructor () { | |
this.storage = {} | |
this.size = 0 | |
} | |
push(element) { | |
this.size++ | |
this.storage[this.size] = element |
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
function Fruit (type) { | |
this.type = type; | |
this.color = 'unknown'; | |
this.getInformation = function() { | |
return 'This ' + this.type + ' is ' + this.color + '.'; | |
} | |
} | |
function Fruit2(type) { | |
this.type = type; |
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
void PrintFullPath(const char* partialPath) | |
{ | |
char full[_MAX_PATH]; | |
if (_fullpath (full, partialPath, _MAX_PATH) != NULL) | |
printf("Full path is %s\n", full); | |
else | |
printf("Invalid path\n" ); | |
} | |
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
int lonelyinteger(vector<int> a) { | |
int result = 0; | |
// for each element if result is equal to start of line then result is set to that value. | |
for (int i : a) | |
{ | |
result = result ^ i; | |
} | |
return result; |
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 "CircleComponent.h" | |
#include "Actor.h" | |
CircleComponent::CircleComponent(class Actor* owner) | |
:Component(owner) | |
, mRadius(0.0f) | |
{ | |
} |
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 <string> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
#include <SDL2/SDL_ttf.h> | |
#include <SDL2/SDL_mixer.h> | |
const int SCREEN_WIDTH = 1280; | |
const int SCREEN_HEIGHT = 960; |
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
# OBJS declares the files to be compiled | |
OBJS = Main.cpp Game.cpp | |
# CC declares the compiler (GCC) | |
CC = g++ | |
# COMPILER_FLAGS declares the additional compilation options | |
# -w suppresses warnings | |
COMPILER_FLAGS = -w |
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 <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
#include <SDL2/SDL_ttf.h> | |
#include <SDL2/SDL_mixer.h> |
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
sv_cheats 1; | |
bot_kick; | |
mp_warmup_end; | |
mp_freezetime 0; | |
mp_roundtime_defuse 60; | |
sv_grenade_trajectory 1; | |
sv_grenade_trajectory_time 10; | |
sv_showimpacts 1; | |
ammo_grenade_limit_total 5; | |
sv_infinite_ammo 1; |
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; | |
// Defining rows and columns of | |
// vector of vectors | |
int main() | |
{ | |
int diagonalRight = 0; |
OlderNewer