mardi 1 septembre 2020

Is there a way of sending/paste a file like .csv to a website with python

I'm trying to send/paste a csv to http://geojson.io/ so my file contains longitudes and latitudes and I want o get them on that map, if there is any method of doing this please help.




How to stop React website from freezing when calling updateState?

I have a page that loads a Material table using data from a database (DynamoDB).

The initial table load is fine, however when items are added to the table after about the 4th item the localhost website freezes.

I have chased it down to be caused by a updateState call that is taking the old and new table data and updating the state.

Here is the code:

Initial data fetch:

const [tableData, updateTableData] = useState([{}])

    useEffect( () => {
    async function refreshData()
    {
      console.log("Init load")
      var invData = await GetPartByType(props.itemType);
      updateTableData( invData )
    }
    refreshData()
  }, [])

update data function:

function updateData(newData)
{
    console.log("Updating Data")
    const invData = [...tableData, newData]
    updateTableData( invData )
}

When updateData() is called ~4 times the website freezes, with each entry getting slower and slower

Any help is appreciated!




How to create malicious link that downloads and triggers a malicious code?

I am trying to build a small sub project that goes like that:
First, create a local web server that contains some malicious links. Second, when a victim presses on a malicious link, it starts downloading and running the malicious code on the victim's machine.

So my question is how to create this kind of link? That downloads and executes a code.

Many tutorials I have found on the Internet show how to make a link download stuff, However, they don't get into the part of triggering the code.

I don't have any experience in web development so if you could provide some sources it would be great.




How can I make a website same as google documents?

I have a web project idea. I researched how I could do it but couldn't find an answer. As with Google documents or ms word, I want to add features such as the user can create a document and change the font, text color (etc.) from the top menu. How can I do these?




Unable to render HTML file in flask

I am learning to render HTML file in flask

my code

app.py:-

from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
   return render_template('index.html')
if __name__ == '__main__':
   app.run()

index.html:-

<html>
<head>
<title>Flask render</title>
</head>
<body>
<h1>This is the Index page</h1>
</body>
</html>  

expected output:-

expected output

What i am getting:-

enter image description here




How to pass particular I'd to particular page in php?

Help me to resolve my issue...

The Issue is:- I have listed each item and it's Id as buttons. Those items where from db. When I try to pass a specific item and it's Id.

The value of last item is passed on to next page.

When I click the each button., the value corresponding to the last button alone goes to the next button.

The Solution I need is ., For each button., the value corresponding to that button should go to next page...

And my code is Echo"<form = 'form' method = 'post' action = SS_Equip.php?id1='>"




High Frequency Display Data on Web

I am interested in building a website that displays financial transaction records in real time, with the data fetched through API calls.

What is the best way to build this web application for performance thank you !