Subscribe Now: standard

Tuesday, December 22, 2009

HoW to set-up PhP MySQL development enviorment and develop in PhP MySql


I would like to develop a programm (stock and accounts) for my own business. I would like to design like - a database (MySQL) and I have to enter data and get reports through a browser on my PC. I want a fully customized application to develop and to maintain for my own purpose.
I have basic programming knowledge in C, C++, VB 6.0, Foxpro 2.6, HTML. And ready to learn new things.
Now can you please suggest me, What softwares I have to download (probably open source) and learn. Already I have installed MySQL 5.0 and now I can create a database and simple SQL queries.

Thanks in advance.
----------------------


I am happy that you have specially asked for opensource tools and yes that's exactly what you should use.
so as you say that ,you are already familiar with C++ ,HTML.
This is going to be a breeze  as all you have to do is combine object oriented programing, with Web technology.

these are the list of programs you will need:
Apache web server.
PhP.
MySQL. (as you have already installed it).
PhPMyAdmin (a GUI for MySQL database management, can make things easier).

I would suggest that you use a combined system like
EasyPhP or WAMP (for windows)
or
XAMPP for Linux

i recommend you export your SQL Database,and install one of these tools and then import it into MySQL.

So that you dont have to spend lot of time synchronizing all of these tools.
installing one of these single packages will take care of all the tools mentioned before.
and just follow there instructions.

So that's it,once tools are ready you will have to learn PhP Programing,
(i strongly recommend the books "PhP and MySQL bible" or "PHP For Dummies" -- or just learn from the net.) 
and database accessing from PhP.( it is simple).
and then Program your software and copy it to the server directory in your system (Apache will take care of that).
then enter http://localhost
And you can watch your talents bloom.

If you are planning to make your server public, you will have to also take care of security settings.

hope that helps,
if you need any further help please contact me from tech-help page of http://blaisemcrowly.co.cc

Thursday, December 17, 2009

Web safety - Stop forwarding useless mails - 10 condments of web safety


i am writing this thing because i am tierd of explaining it to people, again and again.
you may be doing a crime when you are forwarding mails around.

I am sure you all have encountered  with the rubbish mails that come with a message that say
"forward this to 100000 people or tomorrow an ant will bite you" or simply "bad luck will follow you to your grave" .
most of them come with relegious pictures , or other nonsense out of the world content.
below i am mentioning some of them.

1) A mail with a picture saying "gods eye" ( most of you must have seen it) -
    It is a nebula ( a celestial condition) AND NOT GODS EYE
.
    if you want to see gods eye, look into your friend's or enemies eye.

2) Any mail claiming "I am suffering from heart from something that even doctors have not heard off
    and every time this mail is forwarded Some company with the worlds greatest idiot as the CEO
    (it hast to be if the mail is true)
will pay me 500$ each"
  is FAKE
    no one have any advantage by you forwarding it other than some hacker or criminal.

ok that is enough examples.
now most of them may be just prank emails that cause no trouble, but how can you be sure all of them are safe.
The images that are in the mail may have internal hidden scripts that send collect your contact information
(as today, emails can have embedded and HTML content,so it is 100% possible).

the moment you forward these mails ,the details about yourselves and of the people you send it to may be transferred to
a database from where the CRIMINAL may use it for his own purposes.

You may be a Victim ALREADY:
Shocked...
don't be ,because you alone are responsible for it, just take a look how many
spam messages are there in your spam folder of your email account.
all those rubbish mails, advertisements and other stuff.
where do you think they got your email ID from?
i am sure that non of you have official contacted them and said " hey buddy can you do a help and fill my mail box with rubbish"
spamers get the email ID from websites were you may have posted it of simply when of forwarded all that rubbish to me.
you are harming me and yourself.

But what when it is not just about spams, what when it comes to passwords and stuff
yes..they too can be collected.
and did you know if you cause harm to someone by email it is a punishable offence
and the victim cab ask upto a sum of 6lackhs +  jail. (under Indian Law)

Tips to to stay safe ,reduce spam and not be a criminal
SO how can you stay safe: SImple.

  1. Stop forwarding junk, that's why you have a delete button.
  2. Never reply to mails asking for password, NO COMPANY OR EMAIL GROUP WILL ASK FOR PASSWORD BY THE MAIL.
  3. Not forwarding may bring you bad luck, But wont put you in a criminal case.
  4. If you get a mail saying Something has happened to someone close to you,first  call that person up, he will be alright.
  5. Hacking is no easy job, unless the a hacker does not have to hack (what is the use of hacking when you are offering your password)
  6. You will never have to update your email account , if you get such a mail its fake
So that is it..
The 10 Commandments of web safety:
1.Stop sending rubbish, and you may be preventing a terrorist attack on your country ,you never know.
2.Stop sending rubbish, you will have your privacy.
3.Stop replying to rubbish, your path will be clean.
4.Stop responding to offers that are amazing, because they are amazingly fake.
5.Don't send hate mail, even from another Id they can be traced to you, wherever in the world you are.
6.You never win a laptop, TV,Computer ..or whatever from the web for free
(no one intelligent enough to make a website with all that HTMl code is that foolish, to give it free)
7.Search the mail subject in Snopes.com to find if it is fake.
8.Never follow links to your bank's site from a email.
9.Never meet someone whom you met online alone. let others know and select a public place.
10.Use digital signatures on your mail,and insist your friends do so.



for further details contact me from:
http://blaisemcrowly.co.cc    (contact me page)

Tuesday, December 15, 2009

OMG .ogg voribs is not goot it's the BEST



 Here is why you should be using .OGG voribs/theora format instead of mp3,wma ..etc

When i first read about the .ogg & voribs  (1 year back) i was really excited about it ( taking into account that i already was a fan of open software)
but i did not do much about it, just tried converting some .mp3s to OGG to see if the file size reduced, at times it did and sometimes it did not, just like what happen when someone diet and instead of loosing they gain.

It was 1 week before that i really took a look at it carefully when i was in a situation were i wanted a audio file to be converted into the elast possible size but with minimum quality loss.
like a parrot that is trained to repeat what is said ,my grey cells cried immediately Mp3 ..Mp3.. Mp3..
and i set to work, I took a 1minute (1.8MB 128kbps) file so i could test it before i do the complete conversion.

I started of encoding and i slowly discovered something great.

below is the conditions and properties of each file.

FORMAT|   BITRATE|     SIZE|  QUALITY

MP3                128           1.8MB   GOOD
MP3                64             820KB    POOR
MP3                 32           430KB    CRAP


the dip in quality was unbearable, even the voice was getting affected in such a way that its tone and pitch changed to and extend that you immediately notice.

Then i notice the option .OGG in my encoder , so i selected it and redid the entire process and guess what i got results that were from other planets.

below is the conditions and properties of each file.

FORMAT|   BITRATE|     SIZE|  QUALITY
OGG                128           1.2MB   GREAT
OGG                64             534KB   GREAT
OGG                 32            230KB    GOOD

the bit rate virtualy made no difference to the sound quality.
i had to listen to the 32 bit version and 128 bit version alternatively 3 time to feel the minute change that had occurd (i used audacity to analyze it). This siomply means there was no noticable change to quality that can be identified by human analysis easily.

i have no extra words but to request all of you to start using .OGG voribs format for your media ( both audio and video). because it's free and simply awsome in all sense.
I guarentee that you will never will be dissapointed by it.
and firefox 3 and up have inbuilt support for OGG media.


here is a good encoder to convert your media to .OGG = http://www.ogg-converter.com/

VLC Player is the best player that supports .OGG in my opinion 



for further details or tech help
contact me from



Monday, December 14, 2009

C++ source code - Bank transaction simulation


hai
this is a simple program that does the following things.
  • accept name and account number.
  • gives a menu selection to DEPPOSIT or WITHDRAW cash.
  • Controls withdrawal depending on cash balance.
  • Print a detailed sheet with details of all transactions
INCLUDE THE FOLLOWING LIBRARIES:
iostream.h
string.h

===========================code=================




struct trans{
    long int  bal,amont;
    char act,dat[10];
}action[10];
struct cust{
    char nam[25];
    long int baln,accn;
}omer;

int i=0;

int main()
{
    omer.baln=0;
    char y;
    int x;
    void depo();
    void vido();
    cout<<"Enter NAME:";
    cin>>omer.nam;
    cout<<"Enter account number:";
    cin>>omer.accn;
    do{
        cout<<"[1] Depposit\n";
        if(omer.baln>0)
        {
            cout<<"[2] Withdraw\n";
        }else
        {
            cout<<"YOUR BALANCE IS 0 ,PLEASE DEPOSIT A SUM BEFORE OTHER TRANSACTIONS.\n";
        }
        cout<<"OPTION:";
        cin>>x;

        if(x==1)
        {
            depo();
        }
        if(x==2)
        {
            vido();
        }
        cout<<"\nDO YOU WANT TO CONTINUE[y/n]:";
                cin>>y;
    }while(y=='y'||y=='Y');

        void balance();
        balance();
}



void depo()
{
    cout<<"\n\nEnter Date (format- dd/mm/yyyy) :";
            cin>>action[i].dat;
    cout<<"Enter amount to deposit:";
    cin>>action[i].amont;
    omer.baln+=action[i].amont;
   
    action[i].act='D';
i++;
}

void vido()
{
    cout<<"\n\nEnter Date (format- dd/mm/yyyy) :";
            cin>>action[i].dat;
    cout<<"Enter amount to deposit:";
    cin>>action[i].amont;
    if(omer.baln>action[i].amont)
    {
        omer.baln-=action[i].amont;
   
    action[i].act='W';
i++;

    }else
    {
        cout<<"\n***YOU DONOT HAVE ENOUGH BALANCE***\a\a";
    }
}


void balance()
{
    cout<<"\n\n\n";
    cout<<"NAME:"<<<"\t\t\t\t\t"<<"ACC:"<
    cout<<"\n========================================================\n";
    cout<<"Si|\tAMOUNT|\tTRANSACTION|\tDATE|\tBALANCE|\n";
    for(int k=0;k
    {
        cout<<<"\t"<<<"\t"<<<"\t"<<<"\t"<
        cout<<"\n";
    }
    cout<<"========================================================\n";
    cout<<"BALANCE: "<
}





===========================END====================

Saturday, December 5, 2009

c++ source code to seperate or divide a string into words


This program will accept a string and divide it and store each word in a 2D array ,and  then display it.



you will need the following header files
conio.h

string.g
iostream.h

============================================
int main()
{clrscr();
    char tall[80],wrd[10][15];
    cout<<"Please enter your string\n:";
    cin.getline(tall,80);
    int r=0,c=0;
   
    for(int i=0;i
    {   c=0;
  
        while(tall[i]!=' ')
        {
            wrd[r][c++]=tall[i];
            i++;
        }
   
        if(tall[i]==' ')
        {
            wrd[r][c]='\0';
            r++;
        }
    }
clrscr();
    for(int i=0;i
    {
        cout<<"\n"<
    }

   }

------------------------------------------------------------------------------------------------
if you need any hel , feel free to get me at
tech support at http://blaisemcrowly.co.cc

Wednesday, December 2, 2009

ClamAV - Free & open sourceantivirus also the best.


ClamAV or WinClam
ClamAV or Clam Anti-Virus is an open source , free and community supported anti virus software.
It has many advantages and i personally recommend if for use in you P.Cs.

Now i will explain how you can use this amazing project from the international open source community.

DOWNLOAD:
Windows users: http://www.clamwin.com/
Other Users: http://www.clamav.net/download/

ubuntu users may activate the back port repository and install the latest version from the package manager.

USE:
Win clam has a GUI just like other antivirus systems.

The linux versions are are mainly command line based, but if you would like to have GUI, you may install CLamtk or KlamAV.

But i strongly recommend that you learn and use the command line , as it havs more advanced options.

Features:
  • command-line scanner
  • fast, multi-threaded daemon with support for on-access scanning
  • milter interface for sendmail
  • advanced database updater with support for scripted updates and digital signatures
  • virus scanner C library
  • on-access scanning (Linux® and FreeBSD®)
  • virus database updated multiple times per day (see home page for total number of signatures)
  • built-in support for various archive formats, including Zip, RAR, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others
  • built-in support for almost all mail file formats
  • built-in support for ELF executables and Portable Executable files compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor and others
  • built-in support for popular document formats including MS Office and MacOffice files, HTML, RTF and PDF


for more details or help 
feel free to contact me on 
http://blaisemcrowly.co.cc
blaise.crowly@gmail.com

 

Friday, October 30, 2009

Jsymphonic - Sonic Stage for linux - or altranative for SonicStage.


Jsymphonic
SonyWalkman , Sonic stage On linux


So i was talking about Opensource substitutes for Popular software in my last Post, and i thought about one of the tools that i specified it is

Jsymphonic - an opensource substitute for Sonicstage
and allows you to use your Sony WAlkman in Linux,

this single piece of software will answer all the questions like:

How to Run sonic stage on Linux?
How to transfer songs to sony walkman without sonic stage?
How to Use sony walkman on Linux?
How to Transfer music back from Sony Walkman?

so if you are one of them who has been wondering about these ,then this is the answer for all of those .

Sonic stage is a small and simple software writen in java, hence it will work on any OS  that has java installed.
It is really small that you can copy the file into your Walkman and have  a transfer tool that can transfer music from and to your walkman wherever you go.

STEP 1: Download this revolutionary tool (Jsymphonic)

STEP 2: Follow the step by step guide on how to install Java 
if you do not have it already.

STEP 3: Running Jsymphonic

EXTRA: if you face any problems You may please check out

So thats for now enjoy your music ,if you face any tough situations need help with anything feel free to contact me.
blaise.crowly@gmail.com

Tuesday, October 27, 2009

Open Source substitutes for Popular Tools


Hi
In the past few years , the world of open source have taken a giant leap from just being a theory into a world wide phenomenon , bringing with it some of the worlds best software and tool the cyber freaks can hope for.
And while we discuss over this topic we can never ignore the contributions of some giant companies that supported the open source community without limits , namely Google , SUN Microsystms and Canonical.

So today i will be  presenting you with a list of open source substitutes for some of the popular software.
I have personally tried out each of these and believe me , you wont regret moving over to these. 
===============================================
SOFTWARE=============================SUBSTITUTE
================================================

Windows----------------------------------------->   Linux (Trust me you wont look back)

Windows Media Player  -----> VLC (how about never seeing "Canot Play" Message)

Microsoft Office -------------------------> Open Office (Your office will just get better)

Internet Explorer ----> Firefox or Google Chrome(Let me see if you will ever even think of IE)

Photoshop --------> GIMP ( it is great, but not 100% what PS is, but soon it will be, it's really promising, and guess what it can do lot of stuff PS cant)

Quake 3 ------> Assault Cube

And this is some thing that thousands of Users are looking for
a Open Source Substitute of Sonic Stage (Sonicstage) for linux.   
Surprise .. It exist...

guess what it will work on Linux Windows and Mac , and it is portable
and hence you can carry this small file in your sony walkman itself.
it is writen in java to the best of what a program can get to.

I will be writing a tutorial on the basics of it, soon most probably tomorow itself.

if you want any help feel free to conatct me at blaise.crowly@gmail.com
or use the contact page at http://blaisemcrowly.co.cc

Saturday, October 24, 2009

using random() in c++ to asign values randomly


hi all,
today the number of programs that make use of randomly generated numbers are huge, They range from ticket reservation program to Programs that generate random encrypted keys and passwords.
c++ has  a have an inbuilt random number generating function called random found in
the stdlib.h header file.
Here we will be using it to write a program that assign duty to 7 doctors over 7 days a week such that non of them work on the same day and no doctor works 2 days a week. please replace the () in red with < and>
========================CODE======================

#include(iostream.h)

#include(stdlib.h)

        #include(string.h)
struct doc{
    char dname[25];
    int did;
    int wnum;
};

int main()
{
    int dnum[7]={1,2,3,4,5,6,7};
    doc d[7];
    for(int i=0;i<7;i++)
    {
        cout<<"Enter the Details:\n";
        cin.getline(d[i].dname,25);

        cin>>d[i].did>>d[i].wnum;
    }
    long x,j=0;
    for(int i=0;i<7;i++)
    {
        j=0;
        while(j==0)
        {
           
                    x= random(7) + 1;
                    
            if(dnum[x-1]==x)
            {
                j=1;
                cout<<<" "<<<" "<
                                switch (x)
                                {
                                    case '1': cout<<" \nMONDAY";
                                    break;
                                     case '2': cout<<" \nTUESDAY";
                                     break;
                                      case '3': cout<<" \nWEDNESDAY";
                                      break;
                                       case '4': cout<<" \nTHURSDAY";
                                       break;
                                        case '5': cout<<" \nFRIDAY";
                                        break;
                                         case '6': cout<<" \nSATURDAY";
                                         break;
                                          case '7': cout<<" \nSUNDAY";
                                          break;
                                }
                dnum[x-1]= -2;
            }
        }
    }


        return 0;
}

===================END=======================

If you wnat any help feel free to email me at blaise.crowly@gmail.com

Blaise M Crowly
http://blaisemcrowly.co.cc

Friday, October 23, 2009

How To - Pascals triangle using loop - c++ code


hi
i had posted the code to generate Pascals triangle in c++ using arrays, but it can be done in a more easy way , using just 2 for loops.
And it is just 1/4 the amount of code.
Here is an easy logic in c++ to generate pascals triangle using for loops.
The part that has been marked in red is the code used to center align the triangle. I suggest that if you are getting confused you remove that part for better understanding of the Programs Logic.

please replace the () in red with < and> 
====================================================
 
int main()
{
  int n  , d  , l , k=0;
  cin >> n;
d = n;
k=n;
l = 0;
  for (int y = 0; y < n; y++)
  {
while(l
{
cout<<" ";
d = d-1;
};
if(d
{
k = k-1;
};
d = k;


    int c = 1;
    for (int x = 0; x <= y; x++)
    {
      cout << c << " ";
      c = c * (y - x) / (x + 1);
    }
    cout<<"\n";
  }
  cout<<"\n";
  return 0;
}

==================================================

thats it , for any further help you may mail me at blaise.crowly@gmail.com

Http://blaisemcrowly.co.cc
Blaise M Crowly

How to - Pascals triangle using arrays - c++ code


Type: c++
hi all , here is the codes that print the pascals triangle using arrays  to generate it,
WARNING: IF YOU USE BORELAND TURBO C++ it may not allow to declare arrays using variables as size parameters in that case.
remove all lines marked with red and replace them with the text between  the \*  & */  near then. and declare a value for C = number of lines to be printed.

===================================================
#include
int main()
{
int ac,tc,d=0,k, bc,t,i=0,h,f;

int c;  \* int c= "your value" */
cout<<"Please enter the number of lines requeired";
cin>>c;
ac= (2*c)+1;
bc=2*c;
int a[ac];  \* int a[ value twise C  + 1]; */
tc=0;
a[bc]=0;
f=ac;
while(c>=tc)
{
cout<<" ";
tc++;
}
//=========================fill array
while(d<=ac)
{
if(d==c)
{
a[d]=1;
d++;
}

else
{
a[d]=0;
d++;
}
}

//===============================
cout<<"1 \n";;

k=c-1;
int y=0;
//================set and print nums
while(k>0)
{
//align==========
h=c-y;
while(h>0)
{
cout<<" ";
h= h-1;
}
y++;

//--------------------
d=0;
while(d
{
t=d+1;
a[d]=a[d]+a[t];
d++;
}
//==========print
i=0;
while(i
{
if(a[i]>0)
{
cout<<<" ";
i++;
}
else
{
i++;
}
}
cout<<"\n";
k--;
}

}


=================END=========================

for any further help you may please contact me at blaise.crowly@gmail.com

http://blaisemcrowly.co.cc

Blaise M Crowly

Thursday, October 22, 2009

How to - Fibonacci with recursive function - c++


The following is the code to generate the fibonacci number at a user specified position using recursive function.

Code:
==================================================
#include
long fiboo(int y);
void main()
{
int x;
cout<
cin>>x;
cout<
}
long fiboo(int y)
 {
    if (n <= 1) {
        return n;
    } else {
        return fiboo(n-1)+fiboo(n-2);
    }
}

==============================================
ok thats it
if you want any help feel free to contact me
at http//www.blaisemcrowly.co.cc   USE THE CONTACT ME PAGE
or mail me at blaise.crowly@gmail.com

Create a C program that will input letters a-z. but only the consonants will be printed?


Aim: Create a C program that will input letters a-z. but only the consonants will be printed?
Type: Basic C++ , Array Manipulation.

Code:===============================================

#include

int main()
{

char al[26];
for(int i=0;i<26;i++)
{
cout<<"\nEnter alphabet... enter one and press enter : ";
cin>>al[i];
}

for(int i=0;i<26;i++)
{
if( (al[i]!='a')&&(al[i]!='e')&&(al[i]!='i')&&(al[i]!='o')&&(al[i]!='u'));
{
cout<<<" ";
}
}
return 0;
}

==================================================

I wrote it for someone who asked for it in yahoo answers.
for any help , just contact me.
http://www.blaisemcrowly.co.cc use the CONTACT ME page
or mail me at blaise.crowly@gmail.com