Monday 8 August 2022

09 What is Functional Components | what is functional components in hindi




What is functional component?


How to create?





What is  Functional Component?

Its similar and write pattern like Javascript function hence its called functional component.

Functional component can be written using much less code more faster and easier to understand.

Functional component behave and act much the same way as a Class Component. 





Functional Component

Its like a function that takes in props and return JSX. 

JSX stands for JavaScript XML. It is simply a syntax extension of JavaScript. JSX allows us to write HTML in React.

Functional component is also known as a stateless component because not hold or manage state.



NOTE:

It is now suggested to use Function components along with Hooks, which were added in React 16.8.

Filename of component must start with an uppercase character.





Example: Hello.js
// Functional Component Example
import React from 'react';
function Hello(props){
   return (
      <h1>
         Welcome to Learn {props.name}
      </h1>
   )
}
export default Hello;



Example: HelloWorld.js
// Functional Component Example
import React from 'react';
const HelloWorld =()=> {
   return (
      <div>
         <p>Hello World!</p>
   <strong>ReactJS is easy to learn.</strong>
      </div>
   )
}export default HelloWorld;




Sunday 7 August 2022

08 What is component in reactjs | types of component in reactjs in hindi | reactjs ...




What is Component?

Types of Components





what ReactJs  component
Online training in all above technologies



  • Basic meaning of component is “one of several parts of which something is made”
  • In ReactJS one UI page is consists of so many component(s).
  • Components are independent and reusable code. Building blocks of ReactJS Application.
  • Components is like JavaScript functions, but work individually to return JSX code as elements for UI.
  • Parent Component  is group of all child components.


vfp form add the record using scatter and gatther in form | scatter gather using form


vfp form add the record using scatter and gatther in form


You will learn following things:
  • What is SCATTER-GATHER command  ?
  • How to create form using SCATTER-GATHER?
  • Practical




FORM LOAD EVENT COMMANDS:
CLOSE TABLES ALL
USE Clients
SCATTER MEMVAR Blank  




FORM ADD BUTTON CLICK EVENT COMMAND:
APPEND BLANK 
GATHER MEMVAR 
thisform.Release 

Saturday 6 August 2022

02 Dimension vfp array | how to create array in vfp | get value from array


02 Dimension vfp array, how to create array in vfp, get value from array, vfp tutorial in hindi




  • DIMENSION command
  • Example
  • Practical


Using this command you can creates a one-dimensional and two-dimensional array of variables.



How to Crete One Dimensional Array in VFP and Visual Foxpro?

Command : DIMENSION FriendList(10)

How to Create Two Dimensional Array in VFP and visual foxpro?

Command : DIMENSION ItemNQty(2,4)



How To Set Value in Array in VFP and visual foxpro?

Commands:
FriendList(1) = "Rajesh Kalla" FriendList(2) = "Ashish Kalla" FriendList(3)="Jayesh" FriendList(5)="Jayesh" FriendList(5)="Ramesh"



How to Get Values from Array in VFP and Visual Foxpro?

?FriendList(2) ?FriendList(4)


How to Dispaly all the values of specific Array in VFP and Visual Foxpro?

DISPLAY MEMORY LIKE FriendList



Wednesday 13 July 2022

Thursday 30 June 2022

 




vfp icase function, visual foxpro ICASE() function, 3

ICASE(), what is ICASE






Code:

mname1 = "Shyam"

mtotpercent1 = 45

mClass1 = GetClass(mname1,mtotpercent1)

MESSAGEBOX(mClass1,0+654,"Class Type")



mname2 = "Ram"

mtotpercent2 = 59

mClass2 = GetClass(mname2,mtotpercent2)

MESSAGEBOX(mClass2,0+654,"Class Type")




mname3 = "Hussain"

mtotpercent3 = 78

mClass3 = GetClass(mname3,mtotpercent3)

MESSAGEBOX(mClass3,0+654,"Class Type")




mname4 = "John"

mtotpercent4 = 100

mClass4 = GetClass(mname4,mtotpercent4)

MESSAGEBOX(mClass4,0+654,"Class Type")


PROCEDURE GetClass

LPARAMETERS StudentName,TotPercent

RETURN ICASE(TotPercent <= 45 , "Pass Class", TotPercent <= 59.99,"Second Class", TotPercent <=99.99 ,"First Class","Merit")







vfp indbc function | visual foxpro INDBC() function | how to check objec...




INDBC function to check or find the object in database (database container).

Monday 27 June 2022

vfp keymatch function | KeyMatch() | Search Index key in Visual Foxpro |...



Visual Foxpro KeyMatch()  function 


chkKey.Prg


CLOSE ALL
USE friends
SET ORDER TO FRND   && FRIENDNAME

IsKey = .f.

Iskey = KEYMATCH(FriendName)

IF IsKey = .T.
WAIT WINDOW "Found"
ELSE
WAIT WINDOW "Not Found"
ENDIF 

Friday 17 June 2022

reactjs project setup | how to create reactjs project using npx | create...




Project Creation


Syntax :  
npx create-react-app <ProjectName>

Example :  
npx create-react-app RJLearn




Lowercase Project Name 










Project Created

















Run Project 

Syntax :  
npm start

Example :  
npm start





Tuesday 14 June 2022

Reactjs ES Ecmascript WebPack Babel NPM | what is WebPack | What is Bab...





ES - ECMA Scrpt
WebPack
Babel
NPM

What is ES (ECMA Script)?

ECMA is short form of European Computer Manufacturers Association.
use strict
Variable declaration - var , let, const
Enhancement of ARRAY.
Class, Constructor, 
Various types of loops.
For More information visit following links:
https://en.wikipedia.org/wiki/ECMAScript
https://www.w3schools.com/js/js_versions.asp

What is WebPack ?

Webpack is a popular module bundling system built on top of Node. js.
Webpack is a module bundler for modern Java script applications.
Webpack can also load non-js files, such as static assets, JSON files, CSS and more.

What is Babel ?

Babel compiles newer JavaScript into older JavaScript. 
Technically it is a transpiler.
Babel will compile your code into JavaScript that will run without issues on all browsers.


What is NPM ?

NPM - Node Package Manager.
NPM get installed by installing Node.JS . 
NPM is largest package collection library. 
PACKAGE.JSON file where NPM store all package and dependencies version details.





Monday 13 June 2022

reactjs intorudction overview | what is reactjs in hindi | reactjs hindi...


What is ReactJS

ReactJS is a declarative, efficient, and flexible JavaScript library
Famous for building reusable UI components base development.
An open-source, component-based front end library which is responsible only for the view layer of the application. 
It was initially developed and maintained by Facebook  now become META.
ReactJS was first created by Jordan Walke, a software engineer working for Facebook. 
ReactJS first deployed on Facebook’s newsfeed in 2011 and on Instagram.com in 2012.



Features of ReactJS

  • JSX
  • Virtual DOM Manipulations
  • Components
  • One Way Data Binding
  • Performance


Why use ReactJS?

Allows you to divide your entire application into various components.
Easy to learn.
We can use ReactJS on the client and server side as well as with other frameworks.

vfp encryption decryption | vfp encry decry | foxpro encryption decrypti...


LIB.PRG  CODE

***Start of LIB.prg file
function enfunc(cToencrypt)

content=""

FOR e=1 to LEN(cToencrypt)
    m.ch = SUBSTR(cToencrypt,e,1)
    IF ASC(m.ch) < 123
         Content = Content + CHR(ASC(m.ch)+100)
      ELSE
        Content = Content + m.ch
      ENDIF
NEXT

return content




function defunc(cTodecrypt)

content=""

FOR e=1 to LEN(cTodecrypt)
    m.ch = SUBSTR(cTodecrypt,e,1)
    IF ASC(m.ch) > 123
         Content = Content + CHR(ASC(m.ch)-100)
      ELSE
        Content = Content + m.ch
      ENDIF
NEXT

return content

***End of LIB.prg file




LST.PRG  CODE

*Start of LST.prg file
CLOSE TABLES ALL
SET LIBRARY TO LIB
USE USERDET
CLEAR 
GO TOP 
DO WHILE !EOF()
SELECT USERDET
?USERDET.USERID +"----"+DEFUNC(USERDET.USERPASS) FONT "ARIAL",18
SELECT USERDET 
SKIP
enddo
*End of LST.prg file

Tuesday 31 May 2022

vfp fast report from prg file | create report from code in foxpro | repo...




CLOSE TABLES all
SELECT 0
USE friends

CREATE REPORT FriendRepo FROM Friends COLUMN FIELDS FriendName,City,Mobile
REPORT FORM friendrepo preview

Monday 23 May 2022

VFP Extract DBF Field structure to DBF File | Save Dbf Field Structure to Dbf vfp





DbfStru.Dbf

PARAMETERS DbfVal
**** Pass DBF name only, without extension.
CLOSE TABLES ALL 

IF  FILE("&DbfVal"+".dbf") = .T.
SELECT 0
USE "&DbfVal" ALIAS db
gnFieldCount = AFIELDS(gaFieldsArray)
SELECT 0
USE DbfStru  EXCLUSIVE
DELETE FOR DbfName = DbfVal
PACK 
mFieldName = ""
mFieldType = ""
mFieldSize = ""
FOR nCount = 1 TO gnFieldCount 
SELECT db
mFieldName = gaFieldsArray(nCount,1)
mFieldType = TYPE(mFieldName)
mFieldSize = FSIZE(mFieldName)


SELECT DbfStru
APPEND BLANK
Replace DbfName WITH DbfVal
Replace FieldName WITH mFieldName
Replace FieldType WITH mFieldType
Replace FieldSize WITH mFieldsize

ENDFOR 


RETURN DbfVal+" Structure Generated Successfully."
ELSE
RETURN DbfVal+" Not Found."
ENDIF 

Sunday 8 May 2022

convert number integer to date in javascript | jquery datatable asp.ne...



WebForm1.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="JavascriptDateTimeConversion.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>jQuery DataTable</title>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<link href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
    $(function () {
        $.ajax({
            type: "POST",
            url: "WebForm1.aspx/ContactList",
            data: '{}',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: OnSuccess,
            failure: function (response) {
                alert(response.d);
            },
            error: function (response) {
                alert(response.d);
            }
        });
    });
    function OnSuccess(response) {
        $("[id*=contact]").DataTable(
        {
            bLengthChange: true,
            lengthMenu: [[5, 10, -1], [5, 10, "All"]],
            bFilter: true,
            bSort: true,
            bPaginate: true,
            data: response.d,
            columns: [{ 'data': 'ContactID'},
                      { 'data': 'FullName' },
                      { 'data': 'EmailID' },
                      {
                        'data': 'DOB', "render": function (data) {
                            return getDateString(data);
                        }
                    }]
        });
    };

    function getDateString(date) {
        var dateObj = new Date(parseInt(date.substr(6)));
        var options = { year: "numeric", month: "numeric", day: "numeric" };
        return dateObj.toLocaleDateString("en-GB");
    }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin-top:100px;">
        <table id="contact" class="table table-striped table-bordered" >
<thead style="background-color:#DC5807; color:White; font-weight:bold">
<tr style="border:solid 1px #000000">
<td>ContactID</td>
<td>FullName</td>
<td>EmailID</td>
<td>DOB</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
    </div>
    </form>
</body>
</html>




WebForm1.aspx.cs :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JavascriptDateTimeConversion
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        [WebMethod(EnableSession = true)]
        public static List<tblContact> ContactList()
        {
            List<tblContact> tbl = new List<tblContact>();
            dbContactsEntities db = new dbContactsEntities();

            var fld = db.tblContacts.ToList();

            return fld;
        }


    }
}