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|
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More ASP Code Articles More By aspfree developerWorks - FREE Tools! | You'll get answers to many questions and more from David Barnes, Lead Evangelist for IBM Emerging Internet Technologies. David will discuss aspects of Web 2.0 that bring value to corporations, academia, and government. He'll also discuss IBM's vision around Web 2.0, including the importance of remixability and consumability. The discussion will culminate with examples of various IBM Software Group solutions you can use to get ahead of the Web 2.0 adoption curve. FREE! Go There Now!
| | | | Learn how you can extend modern application lifecycle management to IBM System z through the IBM Rational Software Delivery Platform (SDP). The Did you say mainframe? e-kit includes podcasts, webcasts, tutorials, white and red papers, demos, and articles designed to help ease the challenges of modernizing your enterprise. This complimentary kit for mainframe developers is a practical, how-to guide for making the most of an existing development environment, including the skills and infrastructure already in place at an established enterprise. FREE! Go There Now!
| | | | WebSphere Process Server delivers a unique integration framework that simplifies existing IT resources. Often, as IT assets grow to support business demand, so too does their complexity and manageability. In this webcast, we’ll discuss how WebSphere Process Server helps deliver an SOA infrastructure that provides a common model to orchestrate, mediate, connect, map, and execute the underlying IT functions. Discover how WebSphere Process Server simplifies integration of business processes by leveraging existing IT assets as reusable services without the complexities of traditional integration methodologies. FREE! Go There Now!
| | | | Visit IBM developerWorks to download the latest trial version of IBM Data Studio V1.1 at no cost. IBM Data Studio is a comprehensive data management solution that helps you effectively design, develop, deploy and manage your data, databases, and database applications throughout the data management life cycle utilizing a consistent and integrated user interface. Unlike other client-side data management solutions that focus on only one aspect of the application lifecycle or database administration, Data Studio complements the Rational Software Delivery platform, providing unparalleled flexibility for a heterogeneous data server environment across platforms. FREE! Go There Now!
| | | | Learn from the best! Find out how developers use Rational ClearCase to be more flexible, innovative and deliver higher quality code in the Rational ClearCase Power Users eKit. This complimentary eKit provides a collection of materials, like articles, whitepapers, and demos that can help you become a power user of Rational ClearCase. FREE! Go There Now!
| | | | XML has become a common way of storing business data as flat files and many data server vendors including IBM have provided ways to store this data within relational database systems. Increasingly collections of XML files are accessed like databases using an xQuery and other XML standard mechanisms. Businesses find the need to combine the traditional tabular structured data with XML formatted data. In this webcast, you’ll learn about IBM’s WebSphere Federation Server technology, which provides users with the ability to integrate these two data formats. FREE! Go There Now!
| | | | This Fall, IBM Rational talks to you directly through a special teleconference series giving you access to the best minds in IBM Rational - product experts and market thought leaders who will answer your questions during these pre-scheduled telephone conference calls. Register today! FREE! Go There Now!
| | | | Rational Modeling Extension for Microsoft .NET enhances usability for code generation supporting a more intelligent refactoring. The latest enhancements enable organizations with Java and .NET systems and software development maintain architectural integrity across heterogeneous platforms. FREE! Go There Now!
| | | | Visit IBM developerWorks to try the IBM SOA Sandbox for process. The SOA Sandbox for process focuses on providing a trial environment with the necessary tooling and components required to gain a better understanding of business processes and how to best improve existing business processes to derive value quickly. FREE! Go There Now!
| | | | Viper 2 brings a great value to developer communities including SQL, XML, PHP, Ruby, .NET and Java. You probably already know that DB2 Express-C is free for developers to develop, deploy and distribute. Viper 2 provides a variety of means that help move your application from the development stage to deployment more rapidly. This webcast shows how to best utilize the latest tools available for developing DB2 applications. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |