Posts

Showing posts from August, 2023

executionerrorvscodesolution

  This could be due to the current user having an undefined   ExecutionPolicy . In PowerShell  as Administrator , you could try the following: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

pdfshowingreactpdf_react

import React ,{ useRef , useState } from 'react' import { AiFillCloseCircle } from "react-icons/ai" ; import { Button , Modal , Spinner } from 'react-bootstrap' ; import 'bootstrap/dist/css/bootstrap.min.css' ; import { Document , Page , pdfjs } from 'react-pdf' ; import 'react-pdf/dist/esm/Page/AnnotationLayer.css' ; import 'react-pdf/dist/esm/Page/TextLayer.css' ; import ImageWork from './Components/ImageWork' ; export default function App () {     pdfjs . GlobalWorkerOptions . workerSrc = `//unpkg.com/pdfjs-dist@ ${ pdfjs . version } /build/pdf.worker.min.js` ;   const fileInput = useRef ();   const [ files , setFiles ] = useState ([]);   const filearray = [ ... files ];   const [ finalFile , setFinalFile ] = useState ([])   const [ pdfString , setPdfString ] = useState ( '' );   const [ numPages , setNumPages ] = useState ( null );   const [ pageNumber , setPageNumber ] = useSt...

node js server related

 forever is a node.js package that is used to keep the server alive even when the server crash/stops.  When the node server is stopped because of some error, exception, etc. forever automatically restarts it A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever) Forever can be used as forever start app.js The purpose of Forever is to keep a child process  (such as your node.js web server) running continuously and automatically restart it when it exits unexpectedly. Node.js Cluster Process Module: The cluster module provides a way of creating child processes that runs simultaneously and share the same server port. Node.js runs single threaded programming, which is very memory efficient, but to take advantage of computers multi-core systems,  the Cluster module allows you to easily create child processes that each runs on their own single thread, to handle the load. https://www.geeksforgeeks.org/how-does-the-cluster-module-work/ My tak...

agentappvidal

 Create Apk npx cross-env EAS_NO_VCS=1 eas build --platform android --profile preview Create .aab npx cross-env EAS_NO_VCS=1 eas build --platform android

pagination seraching filtering

import React ,{ useEffect , useState , useRef } from 'react' import './style.css' import { useDownloadExcel } from 'react-export-table-to-excel' ; import Table from '@mui/material/Table' ; import TableBody from '@mui/material/TableBody' ; import TableCell from '@mui/material/TableCell' ; import TableContainer from '@mui/material/TableContainer' ; import TableHead from '@mui/material/TableHead' ; import TableRow from '@mui/material/TableRow' ; import Paper from '@mui/material/Paper' ; //pagination call.... import ReactPaginate from 'react-paginate' ; //excel js import ExcelJS from "exceljs" ; import { Button } from 'react-bootstrap' ; export default function Dash () {   const [ AllQuery , setAllQuery ] = useState ([]);   const [ pagenumber , setpagenumber ] = useState ( 0 );   const userperpage = 40 ;   const pagesvisited = pagenumber * us...

react native important points

video 64/71 React native:-- npx create-expo-app --template blank project1 https://github.com/academind/react-native-practical-guide-code shadow for background:-- elevation:-for android for ios:-- shadowColor ShadowOffset ShadowRadius textInput:- maxLength={2} keyboard-type:number-pad autoCapitalized:none autoCorrect false  https://geekyants.com/blog/using-tailwind-css-in-react-native/ https://www.kindacode.com/article/working-with-checkbox-in-react-native/ https://reactnative.dev/docs/running-on-device?os=windows https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor npx react-native run-android[react native android] npx react-native info  eas build -p android --profile preview  eas build -p ios --profile preview eas.json  // "preview": {         //   "android": {         //     "buildType": "apk"         //   }       ...

vidal project info2

  corporate corner :---FemmeConnect.js line no 229 token for localhost for run please comment. note open in mobile view only... note:    "start": "react-scripts --openssl-legacy-provider start",     "build": "react-scripts --openssl-legacy-provider build" aska cornerlogin: //to run ask a corner in localhost xCSRFToken has to comment and while building the app u need to uncomment it api call:  const filterQuery = async (a,b) =>{       console.log(date,a,b)     try {            let response = await fetch('https://wellex.vidalhealth.com:7744/api/hospital-app/ask_corner/get_queries_all/', {         method: 'POST',         headers: {           Accept: 'application/json',           'Content-Type': 'application/json',          withCredentials: true,            'X-C...

api call react vidal

 api call:  const filterQuery = async (a,b) =>{       console.log(date,a,b)     try {            let response = await fetch('https://wellex.vidalhealth.com:7744/api/hospital-app/ask_corner/get_queries_all/', {         method: 'POST',         headers: {           Accept: 'application/json',           'Content-Type': 'application/json',          withCredentials: true,            'X-CSRFToken' :  CookieConstants.get_cookie()         },         body: JSON.stringify({"query_type":"free_query", "query_status": a, "clinical_speciality":b, "start_date":date.length?convert(date[0]):"", "end_date":date.length?convert(date[1]):""})       });       let json = await response.json();       console.log(j...

reduxformimportant

 https://redux-form.com/8.3.0/examples/selectingformvalues/ packages:-  "@reduxjs/toolkit": "^1.9.5", "redux-form": "^8.3.10" store.jsx: import { configureStore } from '@reduxjs/toolkit' import {reducer as formReducer} from 'redux-form' export const store = configureStore({   reducer: {form:formReducer}, }) //contactform: import React, { useState } from 'react' import { Field, formValues, reduxForm } from 'redux-form' import Profile from './Profile' import { reducer as formReducer } from 'redux-form' let ContactForm = props => {   // console.log(props);   const { handleSubmit } = props; const [showProfile,setShowProfile]=useState(false);   return (     <form onSubmit={handleSubmit((formValues)=>{       // console.log(formValues);       setShowProfile(true);     })}>       <div>         <label htmlFor="firstName">First Name</label>    ...