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!
| | | | Poor Requirements Management capabilities in an Enterprise have been linked to excessive project failures, escalating IT costs, and failure to deliver competitive advantage into the marketplace. Join Brianna M Smith from IBM Rational and learn about how successful organizations align IT and Business stakeholders through collaborative processes and tools for effective requirements management, and how an integrated approach across the IT lifecycle can provide unparalleled visibility and traceability to ensure that project teams are delivering on the business vision by "doing the right things" and "doing things right." FREE! Go There Now!
| | | | Build secure Web services with transport-level security using IBM Rational Application Developer V7 and IBM WebSphere Application Server V6.1. Follow this three-part series for step-by-step instructions about how to develop Web services and clients, configure HTTP basic authentication, and configure HTTP over SSL (HTTPS). This first part of the series walks you through building a Web service for a simple calculator application. You generate and test two different types of Web services clients: a Java Platform, Enterprise Edition (Java EE) client and a stand-alone Java client. You also handle user-defined exceptions in Web services. 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!
| | | | 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!
| | | | As organizations have grown increasingly dependent on online software, the risk of malicious attacks has also become far more serious. Fortunately, well-governed organizations can protect their Web applications by injecting vulnerability assessments and ethical hacks into their software development and delivery processes. This paper describes 12 of the most common hacker attacks and provides basic rules that you can follow to help create more hack-resistant Web applications. FREE! Go There Now!
| | | | Try the latest version of IBM Rational Manual Tester V7.0.1 by downloading a free trial from IBM developerWorks. This manual test authoring and execution tool promotes test step reuse to reduce the impact of software change on testers and business analysts and addresses the needs of teams performing at least a portion of their testing manually. FREE! Go There Now!
| | | | As businesses grow increasingly dependent upon Web applications, these complex entities grow more difficult to secure. Most companies equip their Web sites with firewalls, Secure Sockets Layer (SSL), and network and host security, but the majority of attacks are on applications themselves – and these technologies cannot prevent them. This paper explains what you can do to help protect your organization, and it discusses an approach for improving your organization’s Web application security. FREE! Go There Now!
| | | | In this webcast, IBM Rational will discuss the importance of Web application security and will share techniques and best practices to introduce application security testing into current QA processes including: understanding common security vulnerabilities and techniques to integrate security testing with defect tracking and remediation systems in an effort to safeguard sensitive online information. FREE! Go There Now!
| | | | With IBM Rational Systems Development Solution, you can deliver products faster with higher quality. Within this kit, Read the “Model Driven Systems Development” white paper to see how to improve product quality and communication. Then check out the rest of the e-Kit to learn more about important topics that can affect the success of any software project through customer examples, tutorials, informative Webcasts, and best practices for designing, building and managing systems. From start to finish, at every stage in your projects, Rational Systems Development Solution can help your company reach its full potential. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |