Programming, Music, Games. Creation.

Posts tagged “language

Notepad++ Tweaks for Bermuda’s Dota 2 CFG


Default Notepad++ theme is really… Boring. Editing text files can be a frustrating job and sometimes, you need some interesting colours to turn you on (?)

Anyway! When your are editing my CFG or anything and wish to make your Notepad++ look like above, just follow this guide :)

Firstly, download the lastest version of Notepad++

Then download the xml file :

download button

1. Go to Notepad++ > Language > Define your language

2. Import

3. Select the xml file

Then select Language > Bermudic. You need to select this every time you open a cfg.

4. Restart Notepad++

5. Settings > Style Configurator
Language : Global Styles > Style : Default Style > Background > More Colours6 7

6. R/G/B = 28/28/28

6. Global Styles > Current line background > Background > R/G/B = 28/28/28

7. Global Styles > Caret colour > Foreground > white

8. Global Styles > Selected text colour > Background > R/G/B = 50/50/50

9. Finally, Plugins > DSpellCheck > Spell Check Document Automatically to disable dictionary.

12Done :D

How does the computer save Real Numbers?

How does the computer save real numbers?

Lets look at only 2 bytes. (in reality, the computer uses more than 4 bytes to save real numbers.)

The computer uses the following equation to save real numbers

Why use this equation?

setting ‘m’ as numbers before ‘.’ and setting ‘e’ as numbers after ‘.’ is inefficient and takes a lot of memory to save real numbers.
However, using the equation, the computer is able to save real numbers efficiently, no matter how complicated they are.

Still, the computer cannot save wide range of real numbers and cannot save them accurately. It simply saves the data closest possible to the value we want to save. This is called float-point error.

Float-point error

#include <studio.h>

int main(void)
int i;
float f=0.0;

for(i=0; i<100; i++)

printf(“%f “, f);

return 0;

the following is a good example of float error.

Variable f is declared,
until ‘i’ becomes 100, 0.1 is added to ‘f’
since ‘i++’ is used, ‘f’ is added by 0.1 100 times

The output must be 10, however you will see slight difference in the value. For example,


Binary Numbers – The Easy way to Calculate!

Learning C with Bermuda

The table below explains everything!


0 1 0 0 1 0 0 1
27 26 25 24 23 22 21 20


Simply add the 2x when that specific place has ‘1’ instead of ‘0’

Therefore, the example above will be 01001001 = 26+23+20= 64+8+1 = 73


Simple and easy way to calculate binary numbers :)


OR you can simply use my Binary Swift v2 :P

C Language Operators

What are operators? 
Programming languages typically support a set of operators: operations which differ in the calling of syntax and/or the argument passing mode from the language’s functions. Common examples that differ by syntax are mathematical arithmetic operations, e.g. “>” for “greater than”, with names often outside the language’s set of identifiers for functions, and called with a syntax different from the language’s syntax for calling functions. Common examples that differ by argument passing mode are boolean operations, e.g. a short-circuiting conjunction that only evaluates later arguments if earlier ones are not false, in a language with strict call-by-value functions.



Learning C with Bermuda


1. Assignment Operator(=) and Arithmetic Operators(+, -, *, /, %)

Operator Function Direction of Function
= Substitute the value on the right to the left
Ex) a=42
+ Add Left value to the right value
Ex) a=45+6
Subtract the value on the right from the left
Ex) a=5-4
* Multiply the values
Ex) a=4*3
/ Divide the value on the left with the right
Ex) a=2/6
% Divide the value on the left and show the remainder
Ex) a=2%6

If you doubt what these are (except %), please consider going over your Primary 1 books.




2. MORE Assignment Operators

a = a + b a += b
a = a – b a -= b
a = a * b a *= b
a = a / b a /= b
a = a % b a %= b

The functions on the left is same as the functions on the right :)
Don’t get confused with += and =+!!




3. MORE Arithmetic Operators

Operator Function Direction of Function
++a Add 1 and carry out further functions
Ex) a=1
printf(“a is %d”, ++a);[ a is 2 ], a=2
a++ Carry out the function and add 1
Ex) a=1
printf(“a is %d”, a++);[ a is 1 ], a=2
–a Subtract 1 and carry out further functions
Ex) a=1
printf(“a is %d”, –a);[ a is 0 ], a=0
a– Carry out the function and subtract 1
Ex) a=1
printf(“a is %d”, a–);[ a is 1 ], a=0




4. Relational Operators

Operator Function Direction of Function
< a<b
Is a smaller than b?
> a>b
Is a greater than b?
== a==b
Does a equal to b?
!= a!=b
Does a not equal to b?
<= a<=b
Is a smaller or equal to b?
>= a>=b
Is a greater or equal to b?

They always give a boolen value :)

int val1 = 12;
int val2 = 10;

int result1 = (val1==val2);

printf(“Result : %d”, result1);

wil give

Result : 0

since val1 does not equal to val2.
(1=true, 0=false)




5. Logical Operators

Operator Function Direction of Function
&& If both are true, value is true (and)
Ex) a&&b
|| If both any one is true, value is true (or)
Ex) a || b
! If it’s true, value is false
If it’s false, value is true
Ex) !a

Once again, boolen values :)




6. Comma(,) Operator

This operator is used in many ways. it is used when declaring multiple variables, calculating two functions in a single line and much more.

A good example is shown as below

#include <studio.h>

int main(void)
int a=4, b=2;//comma here
printf(“Hello “), printf(“World!\n”);//comma

printf(“%d”, a), printf(“%d”, b);
return 0;

This will give..

Hello World!


Two Things to be Aware when you Declare a Variable


int main(void)
   int a;//declare
   int b;//declare


printf(“%d + %d = %d\n”, a, b, a+b);
return 0;


int main(void)
int a;//declare
   int b;//declare

printf(“%d + %d = %d\n”, a, b, a+b);
return 0;




3 SIMPLE things! :D

1. Variables consist of Alphabets, Numbers and Underscore(_)

2. C Language differentiates  small letters and CAPITAL LETTERS :D
Therefore val and Val are different variables :)

3. Variable CANNOT start with a Numb3r or be a Key Word! It should also not contain any Space or Special Letters