Monday, December 26, 2011

How to set up a network between two computers?

Connect the crossover Ethernet cable to the LAN (RJ45) ports of both the PCs.

PC - 1

  • Go to My Computer > Properties > Computer Name.

  • Change the Computer Name to A and Workgroup name to ABC and click OK to save changes.

  • Go to Control Panel > Network Connections.

  • Right click on your LAN connection and select Properties.

  • Select Internet Protocol (TCP/IP) > Properties.

  • Enter these values:

    • IP Address - 192.168.0.1

    • Subnet Mask - 255.255.255.0



  • Leave the other fields blank and click OK to save changes.


Lost your Windows password?

Due to the security features built into Windows XP, it is virtually impossible to get back into the system without the password.

You have several options to try and get around this problem.

If you have access to another user account with administrator rights, you can use that account to change the password of the account that is locked out. You can also use the default Administrator account that is built into Windows XP.

First you need to boot the system into Safe Mode.

Lock Files and Folders without any Software

Here is step-by-step guide to achieve that.

1. Copy the following text file which contains the program code:-
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

Hide Any Drive on Windows 7, Vista & XP

If you have been wondering how to hide a drive completely on your system,

then here we provide you with an easy, step by step guide for doing it…and yes that is without the use of any software!!

Steps to hide your drive:

Step 1.

Go to Start–>Run or use Windows+R keys and type: diskpart

Method 1: Password Protect any folder in windows xp(without any software).

Requirement: Your hard drive must be formatted using NTFS.

1. Right-click on the folder go to “Properties“.

2. Click the “Sharing” tab and check the box which says “Make this folder private“. 3. When you click on the apply button and your account is not protected with a password then a new window will pop up asking for the password to protect that folder.

4. That’s it done.

Method 2: Lock folders and Drives without any Software

[Work on windows] There are plenty of software which locks drives and folder to protect your confidential data. Why waste money on such tools when you can do it with a simple registry tweak? Here's how:

Caution: Before you attempt these tweaks, please make sure that you have a backup of your registry, just incase something goes wrong in the middle.

Locking Folders:
Consider you want to lock a folder named XXXX in your E:\, whose path is E:\XXXX.
Now open the Notepad and type the following

Code:
ren xxxx xxxx.{21EC2020-3AEA-1069-A2DD-08002B30309D}

Where xxxx is your folder name. Save the text file as loc.bat in the same drive.
Open another new notepad text file and type the following

Code:

ren xxxx.{21EC2020-3AEA-1069-A2DD-08002B30309D} xxxx


Save the text file as key.bat in the same drive.

Use Pendrive or Memory card as RAM in Win 7

Connect your pendrive to ypur computer and go to pendrive Properties. Click the "ReadyBoost". You will see three option-

1. Do not use this device.
2. Dedicate this device to ReadyBoost.
3. Use this device.

Select "Use this device" and select memory space to use ram mamory. Now click Appply to complete the process.

Using RSS Graffiti with WordPress for a no fuss social connectivity on facebook.

Here’s a quick walk-through, how to add your WordPress feed to RSS Graffiti on Facebook:
1. Search for “RSS Graffiti” in Facebook Applications
2. The first step in installing an application onto your Facebook page is to go to that application. In the search results. Simply click on RSS Graffiti to begin the process of installing the application on your Facebook page.
3. Below the icon in the upper left-hand corner is a button that reads “Go to Application”. Simply click on the button to start the installation process.
4. You will need to authorize RSS Graffiti to access your Facebook page. You do this by clicking on the authorization button highlighted in the picture. This will result in a pop up message box that confirms you are granting permission. Once you have confirmed that RSS Graffiti has permission to access your page, you will need to grant it permission to allow constant authorization and permission to publish on your Facebook page. Once you have granted RSS Graffiti these permissions, you are ready to begin setting it up to automatically post your RSS feed to your Facebook page
5. Set up the individual RSS feed you would like to install on your page. So her posts don’t cross-post on my Facebook wall. If you are the only poster just draw the main blog feed.
6. You are set. RSS Graffiti. You can also add other feeds later. The simple dashboard gives you a fair picture of how many articles it has posted on Facebook and when it last checked your blog feed etc. There is also a refresh link to force-check your feed right then.
7. RSS Graffiti is a really wonderful potential tool for social networking. If you found the article useful please share your comments below.

Friday, December 23, 2011

Add two binary (32 bits) and diaplay in binary (32 bits) with memory utilize

[sourcecode language="c"]

/***********************************************************************
Add two binary (32 bits) and diaplay in binary (32 bits) with memory utilize
Coded by Md. Mahedi Azad and presented by www.insafeta.com
*************************************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>

#define MAX_LINE_LEN 64

typedef enum { false = 0, true } bool;

char *getStr(const char *prompt, char *str, size_t len);
bool isValidBinaryStr(const char *);
void binAdd(const char *, const char *, char *);
const char *firstNonZero(const char *);
char A[MAX_LINE_LEN], Aprompt[MAX_LINE_LEN];
char B[MAX_LINE_LEN], Bprompt[MAX_LINE_LEN];
char C[MAX_LINE_LEN];
const size_t bitsPerInt = sizeof(int) * CHAR_BIT;

int main(int argc, char *argv[]) {
const char *a, *b, *c;

sprintf(Aprompt, "Enter up to %d 1s and 0s for A:", bitsPerInt);
sprintf(Bprompt, "Enter up to %d 1s and 0s for B:", bitsPerInt);

/* "Unlimited input and add" */

while (1) {
do {
getStr(Aprompt, A, bitsPerInt);
} while (isValidBinaryStr(A) == false);
do {
getStr(Bprompt, B, bitsPerInt);
} while (isValidBinaryStr(B) == false);
binAdd(A, B, C);
printf("%s + %s = %s\n\n",
(strlen(a = firstNonZero(A)) > 0) ? a : "0",
(strlen(b = firstNonZero(B)) > 0) ? b : "0",
(strlen(c = firstNonZero(C)) > 0) ? c : "0");

}
return 0;
}

/* "binary" addition: A + B = C, ignore carry out of MSB */
void binAdd(const char *A, const char *B, char *C) {
char *a = calloc(bitsPerInt + 1, sizeof(char)),
*b = calloc(bitsPerInt + 1, sizeof(char)), aBit, bBit, cBit;
int i, carry = 0;

/* pad with leading zeros */
memset(a, '0', bitsPerInt);
memset(b, '0', bitsPerInt);
memcpy(a + bitsPerInt - strlen(A), A, strlen(A));
memcpy(b + bitsPerInt - strlen(B), B, strlen(B));
/* compute A + B = C */
for (i = bitsPerInt - 1; i >= 0; --i) {
aBit = a[i] == '1'; bBit = b[i] == '1';
cBit = (aBit + bBit + carry) % 2;
carry = (aBit + bBit + carry) / 2;
C[i] = cBit + '0';
}
free(a);
free(b);
}

/* Return true if all characters of s are either '1' or '0'. */
bool isValidBinaryStr(const char *s) {
const char *p;
bool valid = true;

for (p = s; (*p != '\0') && (valid == true); p++) {
valid = ((*p == '1') || (*p == '0'));
}
return valid;
}

/* Get input string */
char *getStr(const char *prompt, char *str, size_t maxLen) {
char *p;

do {
printf("%s ",prompt);
if ((p = fgets(str, MAX_LINE_LEN, stdin)) != NULL) {
*(strchr(str,'\n')) = '\0';
}
} while ((strlen(str) == 0) || (strlen(str) > maxLen));
return p;
}

/* return pointer to first char != '0' in str */
const char *firstNonZero(const char *str) {
const char *p = str;
while ((*p != '\0') && (*p == '0')) ++p;
return p;
}

[/sourcecode]

Thursday, December 22, 2011

Display others web contents by rss feed

To do this you should need to create a three files-
1. index.php
2. rss.php
3. feed.js

Code of index.php
[php]
<html>
<head>
<SCRIPT SRC="feed.js"></SCRIPT>
</head>
<body>

<form>
<select onchange="showRSS(this.value)">
<option value="">Select an RSS-feed:</option>
<option value="Google">Google News</option>
<option value="MSNBC">MSNBC News</option>
<option value="bdnews24-bangla">bdnews24-bangla</option>
<option value="bdnews24-english">bdnews24-english</option>
<option value="prothom-alo.com">prothom-alo.com</option>
</select>
</form>
<br />
<div id="rssOutput">RSS-feed will be listed here...</div>
</body>
</html>
[/php]

Domain name checking

I have create this to apply api of verisign-grs.com, publicinterestregistry.net, afilias.net and nic.biz. By this you can check a domain name what is available or not.
Click here for demo
Domain Name Search

Greedy Knapsack problem in c programming

[sourcecode language="c"]

/***********************************************************************/
/* Greedy Knapsack problem in c programming *
* Coded by Md. Mahedi Azad and presented by www.insafeta.com *
************************************************************************/
# include<stdio.h>

void knapsack(int n, float w[], float p[], float m){
float x[20], tp= 0;
int i, j, u;

for (i=0;i<n;i++){
x[i]=0.0;
}
u=m;
for (i=0;i<n;i++){
if(w[i]>u)
break;
else{
x[i]=1.0;
tp= tp+p[i];
u=u-w[i];
}
}

if(i<n){
x[i]=u/w[i];
}
tp= tp + (x[i]*p[i]);
printf("\n The path is: ");
for(i=0;i<n;i++){
printf("%f\t",x[i]);
}
printf("\n Maximum profit is: %f", tp);
}

float swap(float *a, float *b){
float temp;
temp= *a;
*a= *b;
*b= temp;
}

int main(){
float w[20], p[20], m;
int n, i ,j;
float ratio[20], temp;

printf ("\n Enter the number of objects: ");
scanf ("%d", &n);
printf ("\n Enter the weights and profits of each object: ");
for (i=0; i<n; i++){
scanf("%f %f", &w[i], &p[i]);
}

printf ("\nEnter the size of knapsack: ");
scanf ("%f", &m);
for (i=0; i<n; i++){
ratio[i]=p[i]/w[i];
}

for(i=0; i<n; i++){
for(j=i+1;j< n; j++){
if(ratio[i]<ratio[j]){
swap(&ratio[i], &ratio[j]);
swap(&w[i], &w[j]);
swap(&p[i], &p[j]);
}
}
}
knapsack(n, w, p, m);
}

[/sourcecode]

Minimum cost spanning tree using prime's algorithm in C programming

[sourcecode language="c"]

/***********************************************************************
* Minimum cost spanning tree using prime's algorithm in C programming *
* Coded by Md. Mahedi Azad and presented by www.insafeta.com *
************************************************************************/

#include<stdio.h>

int a,b,u,v,n,i,j,ne=1;
int visited[10]={0},min,mincost=0,cost[10][10];
void main()
{

printf("\n Enter the number of nodes:");
scanf("%d",&n);
printf("\n Enter the adjacency matrix:\n");
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
{
scanf("%d",&cost[i][j]);
if(cost[i][j]==0)
cost[i][j]=999;
}
visited[1]=1;
printf("\n");
while(ne<n)
{
for(i=1,min=999;i<=n;i++)
for(j=1;j<=n;j++)
if(cost[i][j]<min)
if(visited[i]!=0)
{
min=cost[i][j];
a=u=i;
b=v=j;
}
if(visited[u]==0 || visited[v]==0)
{
printf("\n Edge %d:(%d %d) cost:%d",ne++,a,b,min);
mincost+=min;
visited[b]=1;
}
cost[a][b]=cost[b][a]=999;
}
printf("\n Minimun cost=%d",mincost);

}

[/sourcecode]

Connect localhost with php

We use php language to connect sarver with MySql.

Code:

[php]

<?php
$con = mysql_connect("hostname","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>

[/php]

In apache sarver host name is "localhost", username is "root" and password is null ("") but in zend sarver host name is "localhost", username is "root" and password is "root123" what you have set.

Wordpress

Coming soon...

How to write php

In html file:

[php]

<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Welcome to php language";
?>
</body>
</html>

[/php]

In php file:

[php]

<?php
echo "Welcome to php language";
?>

[/php]

All of pages out put will be: Welcome to php language

Jquery typing game

Just click on "play" and type the text of blue box to get point. Click here for demo

Jquery typing game

Tuesday, December 20, 2011

Welcome

Bangladesh has too many mouth to feed. some say it is too many too much. We say that’s our advantage. The challenge is in feeding mouth, feeding the minds because the greatest power in our abilities of them in our hand.

Its a power to create , the power to take on our hand. There is no better time to began than now. Doodle Kids iPhone app creator is just nine years old, there is no better search engine as google. American Dialect Society members vote “google” the most useful Word of the Year for 2002. There are  over three hundred million people trust and connected at a junction known the most popular social network Facebook created by Mark Zuckerberg.

Now it is time for you to use your greatest creat to unleash your mind. Now it is in your responsibelity to take your country to the top, to challenge up, to show your talents in world.

Break free and create, create to change, create to make a revolution.  (Insafeta)