Showing posts with label 3 attempts login in visual foxpro. Show all posts
Showing posts with label 3 attempts login in visual foxpro. Show all posts

Wednesday, September 2, 2020

Word Count in C

 Write a C  program to count the number of words in a given string.  Two words are separated by one or more blank spaces.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. 

Thank you. My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675. Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com


Program Listing

/* word_count.c
   Author : Jake Rodriguez Pomperada,MAED-IT,MIT
   jakerpomperada@gmail.com
   September 2, 2020
   Bacolod City, Negros Occidental  */
   
#include <stdio.h>
#include <string.h>

void main()
{
char a[100];
int len=0,i=0,word=1;
printf("\n\n");
    printf("\tWord Count in C");
    printf("\n\n");
printf("\tGive a String : ");
gets(a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(a[i]!=' ' && a[i+1]==' ')
word=word+1;
}
printf("\n");
printf("\tThere are %d in the given string.",word);
printf("\n");
}

Tuesday, February 20, 2018

Database Driven Login System with Username Display in Microsoft Visual Foxrpo

This is a database drive login system with username display that I wrote using Microsoft Visual Foxpro. Writing this program is much easier company to other programming language that I used before maybe because Microsoft Visual Foxpro was designed to be database centered language. You can write a complete database application with only a few codes.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.





Table Structure and Sample Records










Sample Program Output


Program Listing


Password Form

Object: Form1   Procedure: Init
=====================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus

 
 Ok Button
 
 Object: Command1 Procedure: Click
 ========================================
 
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) =  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
       
        IF FOUND() then
           DO form menu 
            thisform.Release
            thisform.Hide
            RETURN .t.
        endif

if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Cancel Button
 
 Object: Command2 Procedure: Click
 ========================================
 
 
thisform.Release


Menu Form

Object: Form1 Procedure: Init

SELECT users

fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname

Close Button

Object: Command1 Procedure: Click
=========================================
 
thisform.Release
thisform.hide
DO FORM password




Login Security System with Three Attempts in Microsoft Visual Foxpro

In this article I would like to share with you a sample application that I wrote in Microsoft Visual Foxpro 9 it is not yet database driven for this example but shows you how to create a login security to protect your application from intruders. I hope you will find my work useful.  Thank you.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.







Sample Program Output


Program Listing


Object : Form1           Procedure: Init
=========================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus
  
  
  Object: Command1 Procedure: Click
  ========================================
  
  if thisform.txtpassword.value = "123" AND thisform.txtusername.Value="123" then
MESSAGEBOX("Password Accepted")
RETURN .t.
endif


if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Object : Command2             Procedure: Click
  ==============================================
  
  thisform.release