2014
10-26

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. }
  8.  
  9. float sin(float x){return cos(x-M_PI_2);}
  10.  
2014
10-05

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.
(more…)
2014
10-05

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.
2014
10-05

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.
(more…)
2012
08-12

Moving to new server

In Blog | Tags:
Today I have moved all my project form old server hosted by nazwa.pl, to new server hosted by linuxpl.com.
I also change domains for most of them.
peter-sobieraj.com - my blog.
spirits.ca7.eu - MMORTS game (Massively multiplayer online real-time strategy game).
save-game.ca7.eu - portal with game saves.
katarzyna-wojcik.ca7.eu - Home page of my auntie - translating polish - german.
(more…)
2012
02-28

table strange border color in firefox

Problem:

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 🙂
(more…)
2011
12-19

mysql sum error

In Blog | Tags: ,
Today I was fighting with strange error.
  1.  
  2. SELECT
  3. -- ...
  4. (
  5. (SELECT SUM(t.v)
  6. FROM tab1 t
  7. )
  8. +
  9. (SELECT SUM(t.v)
  10. FROM tab2 t
  11. )
  12. ) AS x
  13. -- ...
  14.  
Something like that give me NULL in x in every row even if there was a lot of records in tab1. (more…)
2011
10-13

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 ?
(more…)
2011
06-16

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…)
2011
01-26

New Theme

Today I create new wordpress theme for my site.
(more…)