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! | As businesses grow increasingly dependent upon Web applications to provide services to customers, employees and partners, these complex applications become more difficult to secure. Although traditional security solutions protect Internet infrastructure layers, they do not guard against HTTP and HTML attacks. Many organizations that conduct security testing still deploy applications that allow attackers to manipulate their logic and wreak havoc on their business. To mitigate this risk, development and delivery teams must address Web application security throughout the lifecycle, addressing the many layers detailed in this paper. FREE! Go There Now!
| | | | Effective governance for lean development isn’t about command and control. Instead, the focus is on enabling the right behaviors and practices through collaborative and supportive techniques. Hear from Scott Ambler on how it is far more effective to motivate people to do the right thing than it is to force them to do so. Learn how to form a lightweight, collaboration-based framework that reflects the realities of modern IT organizations. FREE! Go There Now!
| | | | Visit IBM developerWorks to download a free trial version of Lotus Quickr 8.0, which enables collaboration by transforming the way everyday business content such as documents, rich media, photos, and video can be shared. Lotus Quickr makes it faster and easier to share content of all types (not just documents) within virtual teams. It is designed to make it easier to collaborate across organizational boundaries, while continuing to work within the context of familiar desktop applications. FREE! Go There Now!
| | | | Explore how Rational and WebSphere software enable enterprise documentation in SOA environments. Specifically, a new integration between IBM WebSphere® Business Modeler and IBM Rational® Method Composer software can help technical writers more easily keep enterprise operations manuals in sync with changes that are made to business processes, resulting in more accurate and timely documentation that benefits the entire enterprise. FREE! Go There Now!
| | | | Download the Rational Application Developer (RAD) v7.5 open beta code and start developing applications for the JEE5 standard which features EJB3.0, JPA, JSF 1.2, JSP 2.1 and Servlet 2.5 standards. When you use this beta you will see how you can increase developer productivity for already existing applications with improved support for refactoring, as well as adding new features to existing applications. In addition, the beta provides tooling for JD Edwards, Oracle, SAP, Siebel and PeopleSoft to improve the developer productivity with these enterprise systems. FREE! Go There Now!
| | | | As organizations integrate software into every aspect of business, they are constantly pressured to deliver faster, better, and cheaper results. Unfortunately, a “dis-integrated” software delivery approach reduces returns while increasing costs. This IBM Rational White Paper shows how Integrated Requirements Management aligns organizations around maximizing value and keeping pace with change. FREE! Go There Now!
| | | | Visit IBM developerWorks to download IBM DB2 Express-C 9.5, a no-charge version of DB2 Express 9 database server. DB2 Express-C offers the same core data server base features as other DB2 Express editions and provides a solid base to build and deploy applications developed using C/C++, Java, .NET, PHP, and other programming languages. 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!
| | | | 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!
| | | | <a href="http://zeus.developershed.com/shonuff.php?blackbird=3853&zoneid=442&source=&dest=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fspaces%2Fjazz%3FS_TACT%3D105AGY31%26S_CMP%3DDEVSHED&ismap="><img src="http://images.devshed.com/corp/img/news/jazz01.gif" alt="developerWorks Jazz space" align="left"></a>You've heard the buzz about Jazz... want to know more about it from a developer's perspective? Check out the Jazz space on developerWorks. This space is an up-to-date resource for developers, including technical information about Jazz and products built on Jazz, like Rational Team Concert Express. The Jazz space includes content from a wide variety of sources, including links, feeds, and comments from experts. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |