Skip to content

Instantly share code, notes, and snippets.

View krofna's full-sized avatar
💭
👨‍🎓

Mislav Blažević krofna

💭
👨‍🎓
View GitHub Profile
#include <stdint.h>
#include <iostream>
struct Data
{
uint16_t A;
uint16_t B;
};
int main()
@krofna
krofna / gist:2667873
Created May 12, 2012 17:45
More pointer fun
#include <stdint.h>
#include <iostream>
struct Data
{
int16_t C;
int16_t A;
int16_t B;
};
@krofna
krofna / gist:2909060
Created June 11, 2012 08:22
Za Mislava
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
inline string IntToString(int Integer)
{
stringstream convert;
convert << Integer;
@krofna
krofna / Valgrind
Created August 29, 2012 17:31
Valgrind
==3936== Memcheck, a memory error detector
==3936== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3936== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3936== Command: ../Debug/Server
==3936==
Connect to database...
Connected to database.
Load creature templates...
Creature templates loaded.
Load spells...
@krofna
krofna / Valgrind
Created September 2, 2012 18:09
Valgrind
==4276== Memcheck, a memory error detector
==4276== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4276== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4276== Command: ../Debug/Client
==4276==
==4276== Conditional jump or move depends on uninitialised value(s)
==4276== at 0x4BB1F4: Inventory::DrawBagOpen() (in /home/krofna/Dev/Warrior-of-Dreamworld/build/bin/Client/Debug/Client)
==4276== by 0x4BB1CF: Inventory::Draw() (in /home/krofna/Dev/Warrior-of-Dreamworld/build/bin/Client/Debug/Client)
==4276== by 0x47EF25: World::Draw() (in /home/krofna/Dev/Warrior-of-Dreamworld/build/bin/Client/Debug/Client)
==4276== by 0x4A5885: Game::Run() (in /home/krofna/Dev/Warrior-of-Dreamworld/build/bin/Client/Debug/Client)
@krofna
krofna / Solution to bugged pathfinder.cpp
Created September 5, 2012 06:21
Solution to bugged pathfinder
#include <queue>
#include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using std::vector;
using std::priority_queue;
using std::find;
struct PathfinderNode
@krofna
krofna / Cmake WoD Windows
Created September 28, 2012 16:43
Cmake build WoD Windows
Could NOT find MysqlConnectorCpp (missing: MYSQLCONNECTORCPP_INCLUDE_DIR MYSQLCONNECTORCPP_LIBRARY)
SFGUI found: E:/C++/SFGUI/include
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindSFML.cmake:199 (message):
Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
SFML_GRAPHICS_LIBRARY)
Call Stack (most recent call first):
Client/CMakeLists.txt:7 (FIND_PACKAGE)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
@krofna
krofna / Razlomci.cpp
Created October 1, 2012 07:23
Razlomci
#include <iostream>
// Najveci zajednicki djelitelj
// Euklidov algoritam
int gcd(int a, int b)
{
if(b == 0)
{
return a;
}
@krofna
krofna / bash session.txt
Created October 29, 2012 18:16
bash session
krofna@home:~/Dev/Binary-Tree$ g++ *.cpp --std=c++0x
krofna@home:~/Dev/Binary-Tree$ ./a.out
1) Read current inventory file.
2) Read/Exec monthly update file.
3) Display statistics.
4) Search list items file.
5) Quit.
1
File name: Inventory.txt
File read successfully!
diff --git a/data/geany.glade b/data/geany.glade
index d3d8aa4..3b02f6f 100644
--- a/data/geany.glade
+++ b/data/geany.glade
@@ -5880,11 +5880,11 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="terminal_scrollback_lines_label">
+ <object class="GtkLabel" id="bg_image">