Categories
Web Development

Clear cache with Chrome

Go to chrome://net-internals/#dns and clear the browser DNS cache Hard reload while developer tools are open with right-click on the refresh button Clean the local DNS ipconfig
Read more…

Categories
Uncategorized

Fix Windows 10 problems

DISM.exe /Online /Cleanup-image /Restorehealth sfc
Read more…

Categories
C++

C++ – Singleton Implementation

C++ Singleton Implementation

#pragma once //////////////////////////////////////////////////////////// #include <cassert> #ifdef __APPLE__ #define nullptr NULL #endif //////////////////////////////////////////////////////////// template <typename S> class Singleton { public: Singleton() { assert(!s_instance); s_instance = static_cast<S*>(this); } virtual ~Singleton() { assert(s_instance); s_instance = 0; } static S* Instance() { return s_instance; } private: static S* s_instance; }; template <typename S> S* Singleton<S>::s_instance = nullptr; ////////////////////////////////////////////////////////////

How to use

Read more…

Categories
C++

C++ – Why make the constructor Explicit

The compiler is allowed to make one implicit conversion to resolve the parameters to a function. What this means is that the compiler can use constructors callable with a single parameter to convert from one type to another in order to get the right type for a parameter.

Here’s an example class with a constructor that can be used for implicit conversions:

Read more…

Categories
Web Applications

YouTube – Create a new channel

You can create a new YouTube channel from https://www.youtube.com/channel_switcher
Read more…

Categories
C++

C++ in-class initialization

The two code snippets you posted are not quite equal.

class Something { int m_a = 0; };

Here you specify the value with which to initialize, i.e. 0, at compile time.

class Something { int m_a; Something(int p_a); }; Something::Something(int p_a):m_a(p_a){ … };

And here you do it at run time (or possibly at run time), with the value p_a not known until the
Read more…

Categories
Dekstop IDEs

Visual Studio – Working with Code

Alt+Enter or Ctrl+. for generating functions for example for declaration F12 go to definition Ctrl+K+O switch between header and source Ctrl+Space autocomplete Ctrl+- go back Ctrl+Shift+- go forward Ctrl+D duplicate line Shift+Del delete line and place it in the clipboard Ctrl+Shift+V clipboard with clipboard history in VS Alt+Up or Down move a code
Read more…

Categories
Web Applications

Clean Google Contacts without a Phone number

Recently I wanted to clean my Google Contacts who don’t have a phone because I had like 15 000 Contacts with only an e-mail It actually was not so intuitive, here is my process On your PC Open Google Contacts and Export all your contacts into a .cvs file Import this file in Google Sheets Make a copy and backup
Read more…

Categories
Dekstop IDEs

Visual Studio Back and forth

Use the Ctrl+Shift+- to move forward Ctrl+- to move
Read more…

Categories
Game Development

libSDL – Drawing a BMP Image

#include <iostream> #include <SDL.h> const int WIDTH = 640, HEIGHT = 360; int main(int argc, char* argv[]) { SDL_Surface* imageSurface = NULL; SDL_Surface* windowSurface = NULL; if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { std::cout << “SDL could not initialize! SDL Error: ” << SDL_GetError() << std::endl; } SDL_Window* window = SDL_CreateWindow(“Hello SDL World”, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_ALLOW_HIGHDPI); windowSurface = SDL_GetWindowSurface(window); if
Read more…