Learn Swift by comparison (Part – 1)


Swift IDE If you do not have access to a Mac then try these online IDE to run swift. http://www.runswiftlang.com http://swiftstub.com Both are free. Playground If you are using Xcode 6.x+ then you have a playground to learn swift. You can play around with swift in the playground and learn it. Playground runs code instantly … Continue reading Learn Swift by comparison (Part – 1)

Using C++11 with Eclipse in Mac Yosemite


I am using Eclipse Luna SR1a (4.4.1) and assuming you can install and run Eclipse C++11 Download gcc-5.0-bin.tar.gz from http://hpc.sourceforge.net Unzip the file You will get a usr folder and the folder structure will be following usr ▸ local ▸ bin usr ▸ local ▸ include usr ▸ local ▸ lib usr ▸ local ▸ … Continue reading Using C++11 with Eclipse in Mac Yosemite

Cocos2d-x: Version 3.x Example code snippets


Scale the background image to fill the Screen Add a close button to exit the application Touch Detection (Touch Began, Touch Moved, Touch Ended) HelloWorldScene.h HelloWorldScene.cpp Create a Sprite to the touch Location follow the Touch Detection (Touch Began, Touch Moved, Touch Ended) HelloWorldScene.cpp Accelerate a sprite with device acceleration HelloWorldScene.h HelloWorldScene.cpp Accelerate a sprite … Continue reading Cocos2d-x: Version 3.x Example code snippets

Fibonacci number: Python and C program execution time comparison


Problem: What is the first term in the Fibonacci sequence to contain 1000 digits? Solution with C/C++ Execution time: 0.083 seconds Solution with Python Execution time: 0.188 seconds Lets go to the next level Problem: What is the first term in the Fibonacci sequence to contain 10000 digits? Solution with C/C++ Execution time: 6.986 seconds … Continue reading Fibonacci number: Python and C program execution time comparison

UIU: Learn C++ STL by Examples : Vector


ভেক্টর হল Dynamic array; যেমন, আমরা যখন array declare করি তখন আমাদের সাইজ বলে দিতে হয়। কিন্তু যদি এমন হয়, আমি আগের থেকেই জানি না সাইজ কত হতে পারে; তখন আমরা ভেক্টর ব্যবহার করতে পারি। ভেক্টর ব্যবহার করলে আগের থেকেই সাইজ বলে দেয়ার দরকার হয় না। প্রথমে আমাদের ১. ভেক্টর declare করতে হয়। ২. তারপর … Continue reading UIU: Learn C++ STL by Examples : Vector