Deshi Example of Recursive drawing

Happy Birthday Bangladesh.

Though i am a little late but check out the code, our smrityShoudho can be a local example of recursion, check out the code below (well, maybe it is nothing impressive, but wasted a lot of time to make it, so tried to share among friends, LOL 😀 ):

import java.awt.*;
import javax.swing.*;
@SuppressWarnings("serial")
public class smrityShoudho extends JPanel{
public void painLine(Graphics g, int x1,int y1, int x2,int y2, int dir){
g.drawLine(x1, y1, x2,y2);
if(x2<0 || x2 > frame.getWidth() || y2<0|| y2>frame.getHeight()) return;
painLine(g,x1,y1+frame.getHeight()/8,x2-frame.getWidth()/14*dir,y2,dir);
}
public void paint(Graphics g) {
painLine(g,frame.getWidth()/2,0,frame.getWidth()/2,frame.getHeight(),1);
painLine(g,frame.getWidth()/2,0,frame.getWidth()/2,frame.getHeight(),-1);
}

static JFrame frame;
public static void main(String args[]) {
frame = new JFrame();
frame.add(new smrityShoudho());
frame.setSize(700, 400);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

For those who does not have knowledge about Bangladesh and this monument, should check this following links:
http://en.wikipedia.org/wiki/Jatiyo_Smriti_Soudho
http://en.wikipedia.org/wiki/Bangladesh_Liberation_War

Jatiyo Sriti Soudho (Bengali: জাতীয় স্মৃতি সৌধ Jatio Sriti Shoudho) or National Martyrs’ Memorial is a monument in Bangladesh. It is the symbol of the valour and the sacrifice of 3 million life who had died for the Bangladesh Liberation War of 1971, which brought the independence of Bangladesh from Pakistani rule. The monument is located in Savar, about 35 km north-west of the capital, Dhaka.[1] It was designed by Syed Mainul Hossain. he main monument is composed of seven isosceles triangular planes each varying in size in its height and base. The highest one has the smallest base while the broadest base has the lowest height. The planes are folded at the middle and placed one after another. The highest point of the structure reaches 150 feet. This unique arrangement of the planes has created a structure that seems to change its configuration when viewed from different angles. The architect has used concrete for the monument while all the other structures and pavements of the complex are made of red bricks. Use of different materials has added to the gravity of the monument. 7 planks symbolizes 7 decade, 7 heros, 7 great leaders and when this 7 planks reach to the same point in the top, the one country BANGLADESH!

thanks for toleration. 😛

“Quizzers” for an elder quizzer

This software contains all the basic options that quizzer score card suppose to have, for example option for adding points, deducting pints, show current scorecards and so on. User can manually set the value of the points for each addition of deduction.
 
 
For buzzer round, i have also added another executable jar file which shows in the screen who-pressed-what-when serially!
 
It could have been more flexible and beautiful, if i had enough time.
 

Quizzers.jar

Project ShapLudu (Game for Java Mobile)

I never thought that making software for java mobile would be that much easy, from my first day of J2ME programming, i have started this project of making a ShapLudu Game for Java mobile! As it is my first application and since i have taken a lot of university courses this semester (It is my fault, I should not have taken risk in the name of adventure! i am not blaming any one for that!) but it is really a tough semester for me! it was really default to allocate time for making something which is extra curricular right now. But in fact i have failed to control myself from giving a try to making something really new!

May be it is bad, maybe it is worst, but it is my own work!
I am still working on it, so Feedback and Comments are welcome!
ShapLuduV0.03:
A GUI based board has also been introduced in this version and it also has a pointer which shows at which point of number the player is currently at. Had to fix the build in random number generation package of J2ME.
Introduced a Gui based dice which changes depending on the roll of dice and has changed most of code of previous versions so that it satisfies conventions of better programming.

Very basic structure of construction of a game has been made in this version, it deals with no GUI or any other interfaces other than command listening, Since it was my first application (more spacifically Game development) I wanted to make it work first so that i can get ensured that if i give effort to it, it won’t be fully waste of time.

I will count each Feedback or Comment as contribution!

Unknown Google Chrome’s Language setting to sth known!

It has taken almost 3hr out of my life to figure out an appropriate language for my Google Chrome, when i am lost in between a noodles like alphabet of some other language what i donttttt knooooooooow!

I am considering you blind for a while (Sorry to say but i cant give example of BLACK movie since i dont understand HINDI)

put this link to your Google chrome navigation :
chrome://settings/languages

take your mouse pointer to the second blue column, and there will be some helping comment below your pointer and figure out a non-noodles one and select it!!

go to the next column, click on the first one!

Restart your Chrome!

and thats it!

It helped! I know!

I don’t speak Greek! But it may happen to look like GRREK!

For those who does not understand greek,  please follow the link. There is a series of pic, to guide you!

Basic Diodes

Electric diode has two terminals and this two terminals make the diode call ‘di‘-‘ode‘, which is translated as it “two” “paths”.

The characteristics of a diode can be represented by a resistor and conductance. Basically diodes   make the electric flow one direction discarding the current flow coming from other directions. An Ideal diode follows this characteristic very strictly.
If diode is in forward bias ideal diode simply let the current flow otherwise not. Forward biased ideal diode does not have any voltage difference across it.

Example:
In this example we have to determine V, and we will consider both of the diode as ideal diode.

We already know that ideal diode does not drop any voltage and as long as current is going forward diode should be open but the real problem of this problem is, at the same time Node A can’t be 3V and 1V, so either of the diode is cut  off.

Now calculate the voltage differences:
If we consider 1V as active then, the voltage differences is: 1V – (-3V) = 5V
If we consider 1V as active then, the voltage differences is: 3V – (-3V) = 6V,
for 3V the voltage difference is huge so, for this case we will consider that diode (D3V) as conductive and other (D1V) as cut offed.

Now applying KVL: ( 3V – (-3V) ) =2k i
=> i = 6/2k
=> i = 3mA

Idol diode is what we wanted the diode to work like, but in reality idol diode does not exist, the practical characteristics of a diode looks almost like exponential.

I=Is(e VD / (n VT) – 1)
I=Ise VD / (n VT)

Where,
I is the diode current,
Is is the reverse bias saturation current (or scale current),
VD is the voltage across the diode,
VT is the thermal voltage, and
n is the ideality factor

V is can be described with the equation, V =kT/q
in room temperature V =25mV.

Example:
Now if it is said that thermal voltage, VT =25mV, saturation current, Is= 10 -12 we have to calculate diode current when diode voltage, VD =0.5V!

From diode equation,I = Ise VD / (n VT)
I = 10 -12 e 0.5/ (1 x 25m)
I = 4.85 x 10 -4 A

In reality most of the case across the diode we get few more or less 0.7V.
In constant voltage model without taking help from our previous equations, we consider that Voltage across Si diode is always 0.7V, and for Ge it is 0.3V.

Example:
Now we have to determine i and V of the following circuit…

Node analysis may help us most of the time when we’ll deal with these type of problems.

at Node A:
(5-0.7)/10k + (-5-0.7+0.7)/5k = i
=>i = 0.43mA – 1mA
=>i = -0.57mA,

i is negative so diode is reverse biased, and no current will go through this. i=0

Applying KVL to rest of the circuit…………………………………..

(10k+5k) i2 = (5-(-5)-0.7)
=>i2 = 0.62mA

So, V = i2 5k – 5
= 0.71 x 5 -5
=-1.45

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.