Skip to content

Instantly share code, notes, and snippets.

cmake_minimum_required(VERSION 3.14)
project(HelloWorld)
set(CMAKE_CXX_STANDARD 14)
INCLUDE_DIRECTORIES( C:\\allegro\\include)
LINK_DIRECTORIES( C:\\allegro\\lib )
add_executable(HelloWorld main.cpp)
TARGET_LINK_LIBRARIES(HelloWorld allegro-4.4.2-monolith-mt)
@ArshSekhon
ArshSekhon / Allegro Build Log
Created May 13, 2019 18:23
This is the build log from CLion when trying to build allegro hellow world project
====================[ Build | HelloWorld | Debug ]==============================
"C:\Program Files\JetBrains\CLion 2019.1.3\bin\cmake\win\bin\cmake.exe" --build "C:\Users\Arsh Sekhon\Desktop\COMP369\Class\HelloWorld\cmake-build-debug" --target HelloWorld -- -j 2
Scanning dependencies of target HelloWorld
[ 50%] Building CXX object CMakeFiles/HelloWorld.dir/main.cpp.obj
In file included from C:/allegro/include/allegro/internal/alconfig.h:50,
from C:/allegro/include/allegro/base.h:41,
from C:/allegro/include/allegro.h:25,
from C:\Users\Arsh Sekhon\Desktop\COMP369\Class\HelloWorld\main.cpp:3:
C:/allegro/include/allegro/internal/alconfig.h:401:19: warning: inline function 'int bmp_read24(unsigned int)' declared as dllimport: attribute ignored [-Wattributes]
AL_INLINE(int, bmp_read24, (uintptr_t addr),
@ArshSekhon
ArshSekhon / BlinkingMultipleLEDs.ino
Last active May 4, 2019 03:52
Code for multiple LED circuit for Arduino Circuit
#define RED_LED_PIN 13
#define ORANGE_LED_PIN 12
#define GREEN_LED_PIN 11
#define DELAY_PERIOD 1000
void setup() {
pinMode(RED_LED_PIN, OUTPUT);
pinMode(ORANGE_LED_PIN, OUTPUT);
pinMode(GREEN_LED_PIN, OUTPUT);
@ArshSekhon
ArshSekhon / BlinkingSingleLED.ino
Created May 4, 2019 02:58
Code for creating a blinking LED circuit with Arduino
#define LED_PIN 13
void setup() {
pinMode(LED_PIN,OUTPUT); // use pin 13 in OUTPUT MODE
}
void loop() {
digitalWrite(LED_PIN, HIGH); // set pin to High Voltage : LED ON
delay(1000); // wait for 1 sec
digitalWrite(LED_PIN,LOW); // set pin to Low Voltage : LED OFF
import java.util.*;
import java.io.*;
import java.math.*;
class Solution {
static int L,H;
static int a=0;
public static void main(String args[]) {
long maxBytes = Runtime.getRuntime().maxMemory();
System.err.println("Max memory: " + maxBytes / 1024 / 1024 + " MB");