Skip to main content

Posts

Vigenère cipher

After a long time, I've been doing some coding, well I was teaching.I had to do Vigenère cipher in Java. First of all, What is "Vigenère cipher"? The Vigenère cipher is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers based on the letters of a keyword. It is a form of polyalphabetic substitution ( Wikipedia )  There are a lot of methods for creating this Encryption method. For those who know how to code with OOP Principles, this code may look like Babies Rusk. 😋 We can code this in two ways. Method 1 We use the Vigenère Matrix to find the Cipher Text. We will create the Matrix through looping and row will be either plaintext and column will be key string. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 import java.util.* ; public class Vigenere { public static void main ( String

Download your favorite Serials whole season at once

So, we all have our favorite serials. Or someone recently suggested you a serial which is now on it's latest season and you want to look at all those previous seasons. Some may watch it in online There are plenty of sites to watch them online. mywatchseries.to watch-series.com What if you want to download? You can download using IDM while playing online. How to download a whole season? Playing every episode and download? That's possible. But, is there an easy way? Yes. There is! These are the steps to follow. Before going down, download and install the latest IDM. IDM Latest (This is cracked. But, if you like. Support the developers by buying it) Step one Choose the site where you can download all your episodes. for example : http://dl2.mihanpix.com/Serial/ Index of Serial There are plenty of sites like this. To find those, just google "Index of Serials". Googled it Step two Go to the page of which season you want to download

Install and Use Bash in Windows 10: 3 Steps

Prerequisites 1. Only works for 64-bit builds 2. You'll need to enable Insider Preview Builds Steps 1. So, the first step is you must enable "Developer Mode" Open Settings app, Update & Security > For Developers, switch to Developer Mode.  2. Secondly, open Control Panel > Programs > Turn Windows Features On or Off. And, Enable the “Windows Subsystem for Linux (Beta)” 3. The first time you run the  bash.exe file, you’ll be prompted to accept the terms of service. The command will then download the “Bash on Ubuntu on Windows” application from the Windows Store.  

Hidden Surface Removal

Look at the scratch code " RotatingSolidCube.cpp " and s tudy it carefully #include #include #include #include typedef struct{float x;float y;}Point2D; float dx = 200, dy = 200, dz = 200; GLfloat n[6][3]; /* Normals for the 6 faces of a cube. */ /* Vertex indices for the 6 faces of a cube. */ GLint faces[6][4] = { //traversed in counterclockwise direction as seen from outside {0, 1, 2, 3}, {3, 2, 6, 7}, {7, 6, 5, 4}, {4, 5, 1, 0}, {5, 6, 2, 1}, {7, 4, 0, 3} }; GLfloat v[8][3]; /* Will be filled in with X,Y,Z vertexes. */ void init(void) { /* Setup cube vertex data. */         v[0][0] =100; v[0][1] = 100; v[0][2] = 300;           v[1][0] =300; v[1][1] = 100; v[1][2] = 300;         v[2][0] =300; v[2][1] = 300; v[2][2] = 300;         v[3][0] =100; v[3][1] = 300; v[3][2] = 300;         v[4][0] =100; v[4][1] = 100; v[4][2] = 100;         v[5][0] =300; v[5][1] = 100; v[5][2] = 100;         v[6][0] =300; v[6][1] = 300; v[6][2] = 100;         v[7][0] =10

3D transformation & Projection

Clearly understand the given scratch code for the standard perspective projection. scratch code :  Pres_Proj.cpp Complete the code to  project the cube on the XY plane with the COP is at (0,0,-200) Use 2D translation to shift the projected cube so that the origin (0,0) moves to the centre of the screen [i.e., move the system to (WinWidth/2, WinHeight/2)] Use 3D translation to project the cube with COP is at (100,100,-200) The following file contain the answer for the above questions. While the file runs you can see the answer for 1. If you press your left-mouse button you will see the answer for 2. And by pressing right-mouse button you can view the answer for 3. PerspectiveProjection.cpp Enjoy.. #TRASHCODERS

Some more for your Hunger - I suppose

Now let's do some more. On my last post I've given a program to control contrast, Let's do Auto-Contrast now. autocontrast.m So, I think what is meant by Auto-contrast by doing some changes in the above program. Let's try Modified-Auto-Contrast. modautocontrast.m The last for this post will  be Alpha-blending.. alphablend.m

Point Operations

Okay, Now we have some basic idea of an Image, Let's do some Basic Point Operations on some images. Always remember to test these with low resolution images. Because, Larger images takes more time to process the image. For, Starters do with 512x512 is appropriate. Basic Point Operations Brightness - Increasing and reducing the image's Brightness brightness.m Contrast - Controlling the Contrast of an image contrast.m Threshold - Doing threshold operation with a specific Threshold value threshold.m Inverting - Inverting an image invert.m Do some changes in these and try it yourself for more understanding #TRASHCODERS