Entries of the category : Tutorials


my own sin and cos implementation in C / C++

Here is my own implementation of sin and cos functions in C language. It's may be usedful if you want to compile very small exe file, without using standard libc.
  1. float cos(float x){
  2. if( x < 0.0f )
  3. x = -x;
  4. while( M_PI < x )
  5. x -= M_2_PI;
  6. return 1.0f - (x*x/2.0f)*( 1.0f - (x*x/12.0f) * ( 1.0f - (x*x/30.0f) * (1.0f - x*x/56.0f )));
  7. }
  9. float sin(float x){return cos(x-M_PI_2);}

how to compile 64KB exe in visual 2012 without CRT

CRT (C Run Time) is library installed with visual studio that is usually required by exe files created by visual studio.
If you just copy exe file to other computer it may not work. You need to install on other computer CRT.
So if you want to create 64KB intro for demoscene that don't need any aditional dll's then you need to go around it.

how to use 4klang 3.0.1

1. after you get 4kalng.h and 4klang.inc files from your music friend, copy them to 4klang_sources/3.0.1/
2. run in that directory command nasmw.exe -fwin32 -o "4klang.obj" 4klang.asm
3. File 4klang.obj copy to your Visual C++ project.
4. Go to project settings / Linker / Input / Additional Dependencies, and add 4klang.obj there.
5. Copy example *.cpp from 4klang examples to your main C++ file.

how to create 1KB exe for demoscene (start for 1KB or 4KB intro)

Here is instruction how to make very small *.exe file with simple animation.

table strange border color in firefox


You can find your self wondering why if you put border to table let say color #F00 it have different colors at different borwsers.
Funny 🙂

notepad++ regex replace

Notepad++ is great free text editor.
You can download it at http://notepad-plus-plus.org/.
It have regex replace option.
So how it work ?

howto make order form and check payment status in paypal

It's not so hard to do it if you have good example. Unfortunately it was hard for me to find good example. So I describe it here. (more…)

python fast tutorial

This tutorial is for thous who can programing but don't know Python language. I will show how to use variables, loops, arrays, functions, and how to write scripts. (more…)

C++ lesson 2 – variables

In that lesson I will describe what are variables. (more…)

too big jquery-ui elements

Yesterday I was installing jquery-ui at one of my websites. When I do that as it was writen in instruction all jquery-ui elements was 2 times bigger. I search a while and find how it was solved in demos at jquery.com. That CSS code:
  1. body{ font: 62.5% "Trebuchet MS", sans-serif;}
  2. .demoHeaders { margin-top: 2em; }
  3. #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
  4. #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
  5. ul#icons {margin: 0; padding: 0;}
  6. ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
  7. ul#icons span.ui-icon {float: left; margin: 0 4px;}
Unfortunatly that solution change (destroy) all layout of website. So here is step by step instuction how to do it correct. (more…)