Programming, Music, Games. Creation.

A. Programming

Project Rubick – 3D Matrix Cryptography Project – Part 2

prj_rubick

Project Rubick : 3D Matrix Cryptography

By Bermuda_UT

Inspired by Enigma Machine

Aims

– Cipher and decipher strings using 3D Matrix and manipulation.
– Matrix manipulation must contain unique algorithms.
– Cipher&Decipher algorithm change according to day of year and date.
– Complex change in encryption key according to index of the character and its previous character.
– Compress the encrypted message as much as possible!

Language : Python 3.4.3
GitHub

17/04/15 : The code works however is currently very unorganized with no comments. Just a framework.

/casual on

New project environment : Linux (Ubuntu 14 LTS), VIM to edit codes.
Getting used to the new OS and code editor..

Finished university project so should have time to for Rubick. Expect updates by next weekend :)

/casual off


Project Rubick – 3D Matrix Cryptography Project – Part 1

prj_rubick

Project Rubick : 3D Matrix Cryptography

By Bermuda_UT

Inspired by Enigma Machine

Aims

– Cipher and decipher strings using 3D Matrix and manipulation.
– Matrix manipulation must contain unique algorithms.
– Cipher&Decipher algorithm change according to day of year and date.
– Complex change in encryption key according to index of the character and its previous character.
– Compress the encrypted message as much as possible!

Language : Python 3.4.3
GitHub

17/04/15 : The code works however is currently very unorganized with no comments. Just a framework.

(more…)


Dota 2 Universal Keybind – The Easiest Way to Bind hotkeys in Dota 2

Screenshot_1

Latest version : BETA 1
Announcement : Dota2 Universal Bind is currently open to any suggestion! Please leave any suggestion in the comments or contact me in any ways.. :)

Dota 2 Universal Bind reads your autoexec.cfg and default hotkeys from Dota 2 (by reading config.cfg) and lays the keys out in a simple, easy-to-read UI, allowing you to re-bind keys easily.
Simple to use, you only need to assign ‘dota 2 beta’ folder in your Steam library and you can start rebinding :)

This is currently going through beta and the developer is active to take in any suggestions :)
Source code of the program will be distributed for free after beta phase is over.

Requirements : .NET Framework 4.5 or higher

Download :

download button

Instructions :

1. Run the program and assign the ‘dota 2 beta’ folder in your Steam Library

2. Commands and hotkeys from autoexec.cfg and config.cfg are listed on the left

3. Select any command you wish to bind and Left Click on the key you wish to bind

4. Wheel Click any key to unbind that specific key

5. Right Click to move the binded command to another key (RMB on any key > RMB on another key to move the command)

6. Save & ready to play :)

NOTE : You may have to disable Steam Cloud for Dota 2 in order to bind default hotkeys (available in in-game options).
This will disable syncing your config.cfg, allowing Dota 2 Universal Bind to edit config.cfg and apply changes.Screenshot_2 (more…)


Dragon Slayer – Simple Java Game

dragonslayer_codeacademy dragonslayer_java

(more…)


Search exact text – Java Script

findstring (more…)


Rock, Paper, Scissors – Simple Java Game

rps

(more…)


Phantom Card Stack Bug fix – Maple Story Private Server v117

Guide for newbies :

Go to MapleCharacter.java in src/client folder
Find public void handlecardstack
and replace the code as follows

//

This fixes problem of cards randomly flying around in fixed position when the stack is full, making the player unable to attack.
Found the bug during development of v117 private server, and fixed it myself.
Coded by Bermuda, please redirect to this page if you would like to share.

(more…)


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++)
f+=0.1

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,

10.00002


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.
Wikipedia

.

.

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 :)
therefore..

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!
42

:D


Two Things to be Aware when you Declare a Variable

1. INTRODUCE FIRST

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

   a=5;//input
   b=1;//input

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

CORRECT :)

int main(void)
{
int a;//declare
   a=5;//input
   int b;//declare
   b=1;//input

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

WRONG :(

————————————————–

2. NAME IT PROPERLY

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


[Chemistry] Mole Calculator MINI v1

Mole Calculator MINI! xD It has finally arrived! xP

Download (version 1)
**WARNING : by downloading, you agree that the program will automatically connect to Bermuda’s Unescapable Triangle every time you execute the program

How to use :

CHANGE THE NUMBERS IN THE BOX. DONE. YAY.
What is invariant?
Its quite simple. It just selects the value which will remain constant when the value of the mol is changed!
Check it out for yourself ;)

Trouble shooting :

1. I can’t run the file!
>> you need Microsoft .NET Frame Work (at least version 3.5 I think :P)

2. I changed the volume to decimal, not working. WTF?
>> when you input dec, you type 0. first, then add the number behind.
>> therefore 0., which is 0 is input and it is calculated, giving invalid value ( and not working)
>> simply re-input the other value, like mol to see others.
** Same solution for the NaN value occuring. simply re input (or copy paste the value in to the box)

3. I typed 1, 0.99999999999999999999… is visible (2 and 1.999999999.. etc)
>> There is no error in the value therefore IGNORE it :) Treat it as the value you typed.
>> To know why this happens, see the source. (ITS NOT THAT I WAS LAZY TO FIX. SERIOUS. *COUGH*)

4. This is g@y. Hard to read. I want descent design!!
>> I LIKE BLACK. I DUN CARE. I MADE IT FOR MYSELF LOL

Soure Code :

Public Class Form1

Private Sub MOLbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MOLbox1.TextChanged
If RadioButton2.Checked Then
CONCbox1.Text = Val(MOLbox1.Text) / Val(VOLbox1.Text)
End If
If RadioButton1.Checked Then
VOLbox1.Text = Val(MOLbox1.Text) / Val(CONCbox1.Text)
End If

TextBox4.Text = Val(MOLbox1.Text) * 24
TextBox3.Text = 6.02 * Val(MOLbox1.Text)
End Sub
Private Sub CONCbox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CONCbox1.TextChanged, TextBox3.TextChanged
MOLbox1.Text = Val(CONCbox1.Text) * Val(VOLbox1.Text)
End Sub

Private Sub VOLbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VOLbox1.TextChanged, TextBox4.TextChanged
MOLbox1.Text = Val(CONCbox1.Text) * Val(VOLbox1.Text)
End Sub

Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Shell(“explorer.exe https://imnotbermuda.wordpress.com&#8221;)
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
TextBox2.Text = Val(TextBox1.Text) * 1000
End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
TextBox1.Text = Val(TextBox2.Text) / 1000
End Sub

Private Sub Textbox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VOLbox1.TextChanged, TextBox4.TextChanged
MOLbox1.Text = Val(TextBox4.Text) / 24
End Sub

End Class


Some Simple Stuff :)


yes the form is invisible LOL..

Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
(more…)


Bermuda MultiQuick Tools v1

***DOWNLOAD LINK BELOW***

yupp… i dunno y i named it ‘tool’ but

its actually extracting information in a *.txt file in a chosen directory

(right now, netsat, ip and services in the computer can be extracted)

Netstat – netstat.txt

IP – ipconfig.txt

Services – services.txt

im sure its kinda straight forward.. so no explanation! ;D

(more…)


Bermuda Service Stopper v1.1

I AM NOT RESPONSIBLE IF U STOP AN ESSENTIAL SERVICE FOR WINDOWS AND STH GOES WRONG!
(rebooting will probably fix it anyway ;P this is just ‘stopping’ service)
**downloading link below**

 

Code for Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
(more…)


[Desktop Deco] Codes v1

this is quite a simple yet cool program to make ur desktop cooler!!

if u run the program, this will appear in the CENTRE of ur screen

(this gif image is made by.. ME!! xD)

(more…)


[C#] Binary Swift v2

Download url on the bottom

This is kinda my 1st C# program xD

Simply input any integer into one of the boxes, the value for others will chage too :D

Code for ‘Form 1.cs’

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
(more…)


[C++] Binary Swift v1

NOTE (Added 13/2/14) : Back then, I thought binary = 2bin, decimal = 10bin, hexadecimal = 16 etc. Therefore, there are mistakes in this post!!

simple version! :D

only input 10and  8bin,

Error occurs if u input 16 ir ASCII

/*
Created by Max
Bermuda’s Unscapable Triangle
https://imnotbermuda.wordpress.com/

version 1
*/ (more…)


[C/C++] Dropping Stars – INCOMPLETE

with current knowledge, i cnt fin this thing!! Dx

wish u the best, i distribute the source together!

Download :
http://mfiles.naver.net/d94cc576653d3de1c9224d7d4ea6d3a10b54ac4a92/20110214_231_blogfile/hoso1312_1297685106502_C2d5Vv_zip/Dropping+Stars+by+Max.zip?type=attachment

Reuploaded(13/2/14) :
Dropbox


What is bit & byte ?

Bit is the smallest way to express data for computer using one 2binary(0 or 1).
Byte is formed when 8 bits join together.
… To make things simple, I drew a picture.
It expresses everything ;D


(more…)


2bit, 8bit, 10bit, 16bit

What is 2bit, 8bit, 10bit, 16bit?

2 bit (binary) means that only 2 digits are used to express numbers.
it goes same for 8,10,16.
8 bit (octect) uses 8 digits to express numbers,
10 bit (decimal) uses 10 digits to express numbers and same goes for 16(hexadecimal).

(more…)


What is C (Programming Language)?

Humans can’t speak the Machine Language which computer use.

Even if we try to learn it, it is hard to understand and hardly makes sense to us.

(more…)


History of C Programming Language

C  is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.

Although C was designed for implementing system software, it is also widely used for developing portable application software.

C is one of the most popular programming languages of all time and there are very few computer architectures for which a C compiler does not exist.

C has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C.

Early developments

The development of C occurred at AT&T Bell Labs between 1969 and 1973.

Aaccording to Ritchie, the most creative period occurred in 1972. It was named “C” because its features were derived from an earlier language called “B”, which according to Ken Thompson was a stripped-down version of the BCPL programming language.

The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Ritchie and Thompson, incorporating several ideas from colleagues.

Eventually they decided to port the operating system to a PDP-11. B’s inability to take advantage of some of the PDP-11’s features, notably byte addressability, led to the development of an early version of C.
The original PDP-11 version of the Unix system was developed in assembly language. By 1973, with the addition of struct types, the C language had become powerful enough that most of the Unix kernel was rewritten in C.

This was one of the first operating system kernels implemented in a language other than assembly.

(more…)