Skip to main content

Posts

how to use .json file in react

 Reading a .json file in a React application is quite straightforward. Here are the steps to do it: Create a JSON file : First, create a JSON file with some data. For example, let’s name it data.json and place it in the src folder of your React project. { "users" : [ { "id" : 1 , "name" : "John Doe" } , { "id" : 2 , "name" : "Jane Smith" } ] } Import the JSON file : In your React component, import the JSON file. import React from 'react' ; import data from './data.json' ; const App = ( ) => { return ( < div > < h1 > User List </ h1 > < ul > {data.users.map(user => ( < li key = {user.id} > {user.name} </ li > ))} </ ul > </ div > ); }; export default App ; Run your React app : Start your React application using npm start or yarn start , and yo
Recent posts

How to get started with vim in linux

 Vim These contains all the quick questions for a user just starting with vim and respective links of solutions for those questions or satisfactory anwsers from community. this is a best list of websites that I found online.I arranged in an order.If you like then do like to comment. Questions vim Learning steps - Jorengarenar how to use vim editor – Complete Guide quick Vim Script Tutorial Start Learning vim By Quiz  -By Morzel vim-adventure a Game how to use vim editor – Complete Guide free book to learn vim  -By Steve Losh Book Name  :  Learn Vimscript the Hard Way How to execute file I'm editing in Vi(m) How can I constantly see the current filename in vim? customize your status bar get line number on status line" howto get copy paste  from system clipboard how can i automatically highlight or fix verb tenses IF any suggestions or opinions comment down quickly

find the sum of 3 numbers to find next term

This Blog post Describe How to your may find this algorithm else where too. In this Problem Algorithm: We are given a three digits of sequence after that,we need to find the next element in the array,for Example :- [0,2,4] By suming the previous Three Elements,means [0+2+4]=next_term Hence the next term in the array is 6.Now the array is [0,2,4,6]. Intution: Here are the few conditions return mod value of the following sequence. Every time return the sum of last three numbers. def find_nth_term (n) : mod = 10 ** 9 + 7 if n<= 3 : return sequence[n- 1 ] for i in range( 4 ,n+ 1 ): next_term=sequence[- 1 ]+sequence[- 2 ]+sequence[- 3 ]%mod sequence.append(next_term) return sequence[- 1 ] n=int(input()) #Ouput the nth term modulo (10**9+7) result=find_nth_term(n) print(result)

gradlew flutter

Error signing Expert PS C:\Users\Administrator\Documents\collarlink-1\android> .\gradlew signingReport FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\Administrator\Documents\collarlink-1\android\app\build.gradle' line: 2 * What went wrong: An exception occurred applying plugin request [id: 'com.android.application'] > Failed to apply plugin 'com.android.internal.application'.    > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.       Your current JDK is located in C:\Program Files\Java\jdk1.8.0_191\jre       You can try some of the following options:        - changing the IDE settings.        - changing the JAVA_HOME environment variable.        - changing `org.gradle.java.home` in `gradle.properties`. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https:/

how to make a google signin in flutter

 In this article I will describe how  add a simple google sign  button in your flutter project. Here the Steps to make a Google Signin: St go to your  flutter project folder and then run  Run   ./android/gradlew signingReport    Just Cool Down
 Error Message lib/widgets/widgets.dart:1:8: Error: Dart library 'dart:js' is not available on this platform. import 'dart:js';        ^ Context: The unavailable library 'dart:js' is imported through these packages:     package:collarlink => dart:js Detailed import paths for (some of) the these imports:     package:collarlink/main.dart => package:collarlink/screens/profile_screen.dart => package:collarlink/widgets/widgets.dart => dart:js When This Error Occured 

Flutter MultiDex Application Error

Error Message Multidex support is required for your android app to build since the number of methods has exceeded 64k.  See https://docs.flutter.dev/deployment/android#enabling-multidex-support space-collapse: preserve;"> for more information.   You may pass the --no-multidex flag to skip Flutter's multidex support to use a manual solution.Flutter tool can add multidex support. The following file will be added by flutter: /app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java cannot prompt without a terminal ui  Error: Gradle task assembleDebug failed with exit code 1 When This Message Occured This Message I got when i was running flutter firebase application. Solution The Problem is About MultiDesk support while running your flutter Application.The solution is simple: Steps: If your are running your Application in VSCODE and running your Application in Debug console .or Using key button `F5` . Open Normal Terminal Run command `flutter run` in your Applicati