FLAMES code sample written in .NET What is FLAMES you ask?

Contributed by
Rating: 3 stars3 stars3 stars3 stars3 stars / 11
January 01, 2003
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement

FLAMES .NET code sample

My name is mahesh from jamshedpur (INDIA) . This is my second application using C#. In this Application I used GDI+ .
In India,  North-Indian teenagers (but I am southIndian (A.P)) following small formula for choosing a boyfriend or girlfriend. That is FLAMES.  This is a fun  application I developed in java also after writing this same logic in C# I came to know in C# easy to develop applications. Note:
Flames is a funny logic in this testing if this example has caused any problems, please excuse me its only meant for fun!


What is FLAMES?
F for Friend
L for Lover
A for Affair
M for Marriage 
E for Enemy
S for Sister 

How the calculation?
Take guy name and girl name 
Example: Rama and Sita
1.cut all common words in those names, now the remaining words are rma and sit

2.Now calculate all the words, that is 6 words

3.Now take FLAMES calculate from the F and cut it on 6th letter

Example:
After cutting the FLAMES
FLAME

4. Now again calculate form the next word keep on calculate until you will get one word
that will decide your relationship.

public void check1()
{
String flames="FLAMES";
String guy1=guyt.Text;
String gal1=galt.Text;
StringBuilder sb=new StringBuilder(guy1);
StringBuilder sb1=new StringBuilder(gal1);
StringBuilder sb2=new StringBuilder(flames);
int x=sb.Length;
int y=sb1.Length;
if((x==1)||(y==1)||(x==0)||(y==0))
{
MessageBox.Show(“Invalid Entry");
} else  {
begin:
for(int i=0;i<gal1.Length;i++)    {
int xx=guy1.IndexOf(gal1[i]);
if(xx!=-1) {
sb.Remove(xx,1);
sb1.Remove(i,1);
guy1=sb.ToString();
gal1=sb1.ToString();
goto begin;
}                
}
int count=sb.Length+sb1.Length;
//checking in FLAMES
if(count!=0){
int c=0;
int c1=0;
--count;
int u=flames.Length;
do{
if(c1==count)    {
sb2.Remove(c,1);
flames=sb2.ToString();
c1=0;        }
u=flames.Length;
--u;
if(c>u)         c=0;
if(c==u)          c=-1;
++c;
++c1;
}while(flames.Length!=1);   
Thanks, Any questions or comments Email me at
Mallm_uma@rediffmail.com

blog comments powered by Disqus
ASP CODE ARTICLES

- ASP Forms
- ASP: The Beginning
- Getting Remote Files With ASP Continued
- Inbox and Outbox Manipulation in ASP
- Relational DropDownList Using VB.NET
- Ad Tracking URL Hits
- Use ViewState to display one record per page...
- Send Email using ASP.NET formatted in HTML
- ASP File Explorer
- ASP/XML Interview questions by Srivatsan Sri...
- Pressing RETURN won't submit the form
- This shows how you get the TEXT of a combo r...
- Group Data by Adrian Forbes
- Multiple checkbox select sample
- Multiple checkbox select with all values sam...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials