jeudi 27 août 2020

How do we restrict a user(who is not logged in) to download a particular number of files from a website? [duplicate]

Suppose we give a user a free trail of a website(without logging) that allows him to download 10 files. Now how can we identify him without using cookies?




Interior image stitch API with geocidibg for real estate marketing platform

I need plugin that can stitch interior and street images instantly to panoramic view and it will. project to the google map. I am working on a real estate web.

I want subscribed real estate Agents to use their mobiles phones to take images and stitch it and post to my web platform.




How can i hide succesfull elements of the website i like to show in webview?

i am very new to android studio and i am tryin to hide the 'cookie' element of my website i am showing in webview.

Now i don't really know what i have to do right, i tryed it this way:

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

private WebView clanapp;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    clanapp = (WebView) findViewById(R.id.clanapp);
    clanapp.getSettings().getJavaScriptEnabled();
    clanapp.setWebViewClient(new MyWebViewClient());

    clanapp.loadUrl("javascript:(function() { " +
            "document.getElementById('cookie').style.display='none';})()");
    clanapp.loadUrl("javascript:(function() { " +
            "document.getElementById('cookie').style.display='none';})()");
    
    String ENROLLMENT_URL;
    ENROLLMENT_URL = "myURL";
    clanapp.loadUrl(ENROLLMENT_URL);

}

public final class MyWebViewClient extends WebViewClient {

    @Override
    public boolean shouldOverrideUrlLoading (WebView view, String url) {
        return false;


    }
}

}

Kindly thank you for every helping suggestion.




How to render a page then download it in express js

I want to render a page (output.ejs) and then download that same page all with one button click. In my POST method I redirect to "/output" where the GET request renders output.ejs. However I cannot call res.download("") after that render (something to do with it being asynchronous). What's the best way at tackling this. BTW I am using wkhtmltopdf as PDF generation which needs to happen AFTER the page gets rendered since I am sending data to it.

Best




How to integrate plotly.express chart to flask app?

There is a simple flask app which writes statistics-table from db to a page. How can I plot plotly.express chart on this page? Code for chart that I want to integrate to a flask app: (took from https://plotly.com/python/time-series/)

# Using plotly.express
import plotly.express as px
import pandas as pd

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/...')

fig = px.line(df, x='Date', y='AAPL.High')
fig.show()



Web app java connection to local network via VPN

I have web app to gathering data from devices from local network in java which will be put in web hosting but I need to somehow establish the connection between this local network and my application. Until now I was working with VPN connection made in Win 10. Is there any solution I can use to make a connection to local network so my application can continuously reading data from devices while being hosted on the internet? I haven't choose any web hosting service yet.




What to use for an existing old looking website redesign?

I'm working on an old looking website and I would like to "refresh" it a bit but I'm not really good at designing things so I was wondering if there are solutions that exists with predefined CSS/JS and put it on my website. I heard about Bootstrap but I don't really know if it's good.

Do you have some tips on what I should use ?