Skip to content

Instantly share code, notes, and snippets.

View vamsee9's full-sized avatar
:octocat:
Just Coding

vamsee. vamsee9

:octocat:
Just Coding
View GitHub Profile

Here is an example of how you could use React and Ajax to create a component that fetches data from an API when a button is clicked, and then hides the button after it has been clicked:

import React, { useState } from 'react';
import axios from 'axios';

const MyComponent = () => {
  const [data, setData] = useState(null);
  const [buttonHidden, setButtonHidden] = useState(false);

Here is an example of how you could use HTML, CSS, and Ajax to create a page that fetches a person's name, age, and ID from an API when a button is clicked, and then hides the button after it has been clicked:

<!-- index.html -->
<html>
  <head>
    <title>Data Fetcher</title>
    <link rel="stylesheet" href="styles.css" />
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  </head>
@vamsee9
vamsee9 / flutter.sh
Created September 19, 2021 13:32
To create flutter app with packagename - VSCode
#!/usr/bin/env bash
###################################################################
#Script Name : flutter.sh
#Description : To create flutter app with packagename
#Args : echo and read strings
#Author : Vamsi krishna kari
#Email : 4n0n5ur7@protonmail.com
#License : The MIT License
###################################################################
/*
I decided on the Fira Code cursive font for now. Works better for me than FlottFlott.
*/
.mtk7,
.mtk3,
.mtk13,
.mtk16 {
margin-left: 1px;
font-family: "Fira Code";
font-size: 14px;

Input reading and output formatting #2


Problem Submissions Leaderboard Discussions This problem is designed for you to improvise on how to read input and format the output.

Input Format

#!/bin/sh
echo "This is automated script for run python flask creation"
echo ""
py -m venv env
echo ""
echo "Wait for 5 seconds"
echo ""
sleep 5
cd env/Scripts
# Step 1:
git clone --bare <REPOSITORY URL with ".git" extention>
cd <repository folder>
# Step 2:
# ~ Required GitHub Email and Username
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='vamsee9'
navigator.mediaDevices.getUserMedia({ audio: true })
.then(function(stream) {
console.log('You let me use your mic!')
})
.catch(function(err) {
console.log('No mic for you!')
});
import sys
n = int(input())
ar = []
ar2 = []
for a in range(n):
ar.append([int(x) for x in input().split()])
ar2.append([0 for x in range(5)])
import React, { Component } from "react";
import "./App.css";
import TextField from "@material-ui/core/TextField";
import Button from "@material-ui/core/Button";
const initialState = {
pounds: "",
kilograms: "",
};