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! | Attend this launch webcast with Scott Hebner, Vice President of IBM Rational Marketing and Strategy, for an overview of Rational’s new software offerings and resources to help modernize and accelerate software innovation on i on Power Systems – while ensuring past application investments are protected and continue to grow. Learn how these solutions are helping customers extend their core i5/OS solutions toward modern architectures such as SOA and web technologies to deliver business improvements that stand the test of time. 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!
| | | | Join this webcast to see how IBM Data Studio Developer and pureQuery can take the pain out of Java data access. uApplications developed using both Java and SQL have become a common requirement. Database connectivity using Java Database Connectivity (JDBC) to create an application is a multi-step tedious process, and tooling that covers both SQL and Java has been unavailable, until now. IBM Data Studio introduces the pureQuery platform: a high-performance, Java data access platform focused on simplifying the tasks of developing, managing, and optimizing database applications and services. 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!
| | | | Listen to this webcast to get an overview of Info 2.0 and a technical demo of how to quickly build an enterprise mashup. IBM's Info 2.0 technology leverages emerging Web 2.0 technologies such as mashups, feeds, AJAX, and JSON in order to simplify assembly of information using feeds and services. Come learn about the technical elements of Info 2.0 including the Feed Generation framework, Mashup Engine, and mashup assembly components. Learn how to pull information from databases, departmental information, and the Web to create mashups critical to your company’s success. We will also discuss best practices to help you get started. 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!
| | | | Join this Rational Talks to You teleconference on December 4 at 1:00 pm ET to discuss how Rational Method Composer can help meet your compliance objectives. Get your questions answered! 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!
| | | | Get a free trial download of the latest version of IBM Rational Performance Tester V7.0.1, a load and performance testing solution for teams concerned about the scalability of their Web-based applications. Combining multiple ease-of-use features with granular detail, Rational Performance Tester simplifies the test-creation, load-generation and data-collection processes that help teams ensure the ability of their applications to accommodate required user loads. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |