Halaman

Tampilkan postingan dengan label Tips. Tampilkan semua postingan
Tampilkan postingan dengan label Tips. Tampilkan semua postingan

Minggu, 25 November 2012

[c++]Void Ptr storing your pointer to classes

A quick note, if you do store your inherited class, and then store them to a void pointer. Later on you call a method which is "public" from the parent class, please remember to static cast your void ptr to the parent class because:

DerivedClass *dc = new DerivedClass();
void *ptr = dc;

..
..
some mumbo jumbo.. :)
..
..

void SomeFunction(void *ptr)
{
BaseClass *base = (BaseClass*)ptr;
//this will give you access violation which willl gives you a head scratcher.. i've been there.. :'(
}

to fix above situation, you should

BaseClass *dc = new DerivedClass();
void *ptr = dc

//.. now it is safe to use
//that SomeFunction

..why?? dunno.. but it worth as a note.. well at least for me that is.. hehe ;) Cheers!

Minggu, 21 Oktober 2012

[Irrlicht]Blender 2.6X as your game scenes editor?

Just a quick note for me to implement scene / level editor in the future,
You could generate your UVs, Images, Vertices, Faces (even triangulates them) through the python scripting library..

And by using blender's "Append / Link" along with "Custom Properties" , we should be able to load / re-use and do almost everything to compose our game world. Wouldn't it be great to have msvc express for the IDE, angelscript / lua as the scripting interface, and Blender as your modeler and game scene editor?

For the 'future me" here is a list of scripts function which will help you.. :p
  1. dont forget the 'dir' command! example: dir(bpy.data.meshes['mesh_id']
  2. bpy.data.images['IMAGE_ID'].filepath for retrieving physical location of the image file used as the texture
  3. bpy.data.libraries['LIB_ID'] for your external files..
  4. list(bpy.data.meshes["YOUR_MESH_ID'].vertices) this is an array of your vertices
  5. list(bpy.data.meshes[' YOUR_MESH_ID '].faces[1].vertices) this is the face, and the indexs of your vertices
  6. it is a bit longer to get this one.. but here it is.., to get the texture coordinates: bpy.data.meshes["YOUR_MESH_ID"].uv_textures['UVMap'].data[1].uv# with # being 1 to 4..
  7. a simple tutorial on wikibook : exporting scene!
Now there you have it.. a complete arsenal to represent a 3d world (vertices, faces, textures, texture coordinates, and transforms..) what? owh yes.. what about animation you asked? well.. for the time being, if you need an animated mesh, you should consider manually add them to your 'static' world ;)

cheers!

Sabtu, 09 Juni 2012

KPR Bank Jabar :)

Tanggal 8 Juni 2012 merupakan tanggal akad kredit saya di Bank JABAR :) saya sungguh bersyukur karena 1 dari 3 dari target janji saya(Atap, Kendaraan, Tabungan) bisa saya penuhi buat keluarga saya.. hoho..

Nah, yang menjadi kejutan untuk saya adalah perhitungan bunga (walaupun sy tahu bahwa perhitungan bunga "floating" merupakan salah satu perhitungan yang cukup 'mengerikan') karena di tahun ke-2 cicilan KPR saya adalah (mungkin) sebesar 13.5%, dan lonjakan kredit bulanan menjadi agak sedikit 'lumayan besar' oleh karena itu, saya membuat sebuah excell spereadsheet yang mungkin bisa membantu rekan-rekan sekalian yang ingin menghitung  cicilan KPR rekan (dikhususkan untuk bank JABAR)

Download file excell untuk menghitung KPR Bank Jabar - Prime Lending Rate (metode anuitas bulanan) bersangkutan, rekan-rekan bisa mendownload dari link berikut ini :


Semoga bermanfaat :D

Rabu, 02 November 2011

Packet Sniffer

When you are working with the internet / network, you need to make sure that the packet you sent/receive is what you are planning to get / send

This open source packet sniffer is a very great project. It could even sniff your password when you even though you send them using ssl/encryptions

Here is the link to that wonderfull project : http://code.google.com/p/ospy/

Very nice!!

Rabu, 10 Agustus 2011

Solving : Windows Update Standalone Installer 0x80070422 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it

If you stumbled that one,
you have accidentally disabled Windows Update Service, to enable the service again go to your Administrative Tools, and enables the Windows Update Service

Here is the step :
  1. Click on Windows Icon / Start Menu
  2. Administrative Tools
  3. Services
  4. Search for "Windows Update", double click on it, and then enable this service
hope this help! :)