jeudi 31 octobre 2019

What is the main technology this website is based on and what I need to learn

IFTTT.com

Hi Coders,

I am new to coding and my goal to make a beautiful website like this.

Can you please tell me what technology is this website based on and what languages I need to learn in order to make similar website?

Also, I don't any coding experience and i plan to start with HTML and CSS. So, From your experience - How much time line should i realistically expect to get to my goal?

Thanks for all the help. Vi




I want to send voice to voice chat from frontend I have a code which record the voice and create a file

I have a code of recording voice chat and create a file but i want to make a voice chatting page where user communicate with voice chat.

     function createDownloadLink(blob) {

var url = URL.createObjectURL(blob);
var au = document.createElement('audio');
var li = document.createElement('li');
var link = document.createElement('a');

//name of .wav file to use during upload and download (without 
extendion)
var filename = new Date().toISOString();

//add controls to the <audio> element
au.controls = true;
au.src = url;



   var file_data = url;

   var form_data = new FormData();

   form_data.append('file', file_data);
   form_data.append('action', 'md_support_save');



//save to disk link
link.href = url;
link.download = filename+".wav"; //download forces the browser to donwload the file using the  filename
link.innerHTML = "Save to disk";

//add the new audio element to li
li.appendChild(au);

//add the filename to the li
li.appendChild(document.createTextNode(filename+".wav "))

//add the save to disk link to li
li.appendChild(link);

//upload link
var upload = document.createElement('a');
upload.href="#";
upload.innerHTML = "Upload";
upload.addEventListener("click", function(event){
      var xhr=new XMLHttpRequest();
      xhr.onload=function(e) {
          if(this.readyState === 4) {
              console.log("Server returned: ",e.target.responseText);
          }
      };
      var fd=new FormData();
      fd.append("audio_data",blob, filename);
      xhr.open("POST","upload.php",true);
      xhr.send(fd);
})
li.appendChild(document.createTextNode (" "))//add a space in between
li.appendChild(upload)//add the upload link to li

//add the li element to the ol
recordingsList.appendChild(li);

}

Here is the code where file is downloaded in browser. I don't know how to send this file to another user from frontend while using wordpress. Can anyone suggest me what to do ?




Missing Require Parameters for [Route: blalba.Destroy]

Error

Missing required parameters for [Route: brands.destroy] [URI: brands/{brand}].

I found this error for the first time and I have no idea about it.

Code

  • View
@foreach ($brands as $key => $brand)
<tr>
    <td></td>
    <td></td>
    <td></td>
    <td>
        <form action="" method="POST">
            <a class="btn btn-info" href="">Show</a>
            @can('product-edit')
                <a class="btn btn-primary" href="">Edit</a>
            @endcan
            @csrf
            @method('DELETE')
            @can('product-delete')
                <button type="submit" class="btn btn-danger">Delete</button>
            @endcan
        </form>
    </td>
</tr>
@endforeach
  • Controller
    public function destroy(Brand $brand)
        {
            $brand->delete();
            return redirect()->route('brands.index')
                ->with('success', 'Brand deleted successfully');
        }
  • Route List
+--------+-----------+---------------------------------+----------------------+------------------------------------------------------------------------+-------------------+
| Domain | Method    | URI                             | Name                 | Action                                                                 | Middleware        |
+--------+-----------+---------------------------------+----------------------+------------------------------------------------------------------------+-------------------+
|        | GET|HEAD  | brands                          | brands.index         | App\Http\Controllers\BrandController@index                             | web,auth          |
|        | POST      | brands                          | brands.store         | App\Http\Controllers\BrandController@store                             | web,auth          |
|        | GET|HEAD  | brands/create                   | brands.create        | App\Http\Controllers\BrandController@create                            | web,auth          |
|        | DELETE    | brands/{brand}                  | brands.destroy       | App\Http\Controllers\BrandController@destroy                           | web,auth          |
|        | PUT|PATCH | brands/{brand}                  | brands.update        | App\Http\Controllers\BrandController@update                            | web,auth          |
|        | GET|HEAD  | brands/{brand}                  | brands.show          | App\Http\Controllers\BrandController@show                              | web,auth          |
|        | GET|HEAD  | brands/{brand}/edit             | brands.edit          | App\Http\Controllers\BrandController@edit                              | web,auth          |
+--------+-----------+---------------------------------+----------------------+------------------------------------------------------------------------+-------------------+



how to open the website using python in Mac

I wan to open a website and download an file to local location using python in Mac mini.

I tried upto just opening the browser but unable to give userid and password.




How do i login to my Google website and add a meta tag or verify with google analytics?

Google recently made me a free website when I made my business page,but I need to verify site ownership and I have absolutely no experience with any of the behind the scenes stuff. Apparently i need to verify I own the site by adding html tag near the header,or I can use the google analytics account I just made,but I don't know how to sign into my domain to be able to add these tags. When I login my site from my google my business page it only gives option to edit business info,number,address,photos,content,etc... Can someone please explain me in a way that's easily understood how the hell to get into my site as the owner to add these meta tags??




How to center title of a post on my website on CSS?

The title and image of my posts are not aligned with the rest of the website. I unfortunately had to tweak the menu and content a little bit to visually center it on the browser window, but it seems it might have created a 'shift' with the header/image.

example of post with the issue: http://www.overfit-not.com/the-danger-of-feature-selection-with-random-forests/

I have not been able to do this myself. Below is the code I used to actually center the content of the post relative to the menu.

.site-content {
    width: 105%;
    display: inline-block;
}



can't retrieve the data from database in laravel

I have the controller with function

public function caritiket(Request $request){
    $tgl=($request->tgl);
    $kota1 = ($request->kota1);
    $kota2 = ($request->kota2);
    $jumlah = (int)$request->jml_p;

    // $cek = DB::table('tb_bis_wp')->where('tanggal',$request->tgl)->where('kota1',$request->kota1)->where('kota2',$request->kota2)->count();
    // if ($cek > 0) {
        $cek1 = DB::table('tb_bis_wp')->where('tanggal',$request->tgl)->where('kota1',$request->kota1)->where('kota2',$request->kota2)->get();
        foreach ($cek1 as $cek1) {
            $a=$cek1->tanggal;
            $b=$cek1->kota1;
            $c=$cek1->kota2;
        }
        return redirect('/tampil/daftartiket////');}

the input from view is already have the same name as in the function caritiket(Request $request), after that the route link to function daftartiket() this is the function daftartiket

public function daftartiket($a,$b,$c,$jumlah){
        $jml= $jumlah;
$data = DB::table('tb_bis_wp')->where('tanggal',$a)->where('kota1',$b)->where('kota2',$c)->get();


                return view('member/daftar_tiket',['data'=>$data]);
    }

in the view i have script like this

 <table class="table table-bordered tabel table-striped">
                <thead class="thead-dark text-center">
                    <tr>
                        <th scope="col">Kode Rute</th>
                        <th scope="col">Waktu</th>
                        <th scope="col">Rute</th>
                        <th scope="col">Kelas</th>
                        <th scope="col">Harga</th>
                        <th scope="col">Sisa Kursi</th>
                        <th scope="col">Option</th>
                    </tr>
                </thead>
                <tbody class="text-center">
                @foreach($data as $z)
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        <td>
                            <a href="/tampil/#/" class="btn btn-primary ">Pesan</a>
                        </td>
                        </tr>
                    @endforeach
                </tbody>
              </table>

it can direct to the view, but the data can't out, can somone help me?




advanced web scraping for homework (Python) investing

I am doing a homework where I want to exctract information from trading a website. In this case investing.com I want to build a live plot about an specific FX (example "AUD-CAD"). And for do that, I need to extract the values of candles. (for example every 5 secs)

https://m.investing.com/currencies/aud-cad

here is the image

left = candles right = values of every candles

to be able to see every value is necesary to do click on "time lapse", in this case 5 minutes. and I can see in information from page a new xhr type. The problem is the url from this new file. I can not enter to this URL, then this information not apear if I write ctrl+u (see HTML code).

I would like to know If there are a way for be able to extract this values automatically using web scraping.

more information about this response.

General: Request URL: https://m.investing.com/instrument/services/getChart?volume_series=yes&events=no&candle_count=40&pair_interval=300&chart_type=candlestick&pair_id_for_news=0&pair_id=47&symbol=AUD%252FCAD&showECEvents=false Request Method: GET Status Code: 200 OK Remote Address: 142.54.22.221:443 Referrer Policy: unsafe-url

Response Header: Accept-Ranges: bytes Age: 0 Cache-Control: no-store, no-cache, must-revalidate Connection: keep-alive Content-Encoding: gzip Content-Length: 840 Content-Security-Policy: upgrade-insecure-requests; block-all-mixed-content Content-Type: application/json; charset=UTF-8 Date: Thu, 31 Oct 2019 20:24:03 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: nginx/1.16.1 Set-Cookie: ses_id=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=m.investing.com Vary: Accept-Encoding,User-Agent Via: 1.1 varnish X-Powered-By: PHP/7.1.8 X-Varnish: 1807797307

Request Headers: Accept: application/json, text/javascript, /; q=0.01 Accept-Encoding: gzip, deflate, br Accept-Language: es-ES,es;q=0.9,en;q=0.8 Connection: keep-alive Cookie: adBlockerNewUserDomains=1566366442; _ga=GA1.2.490180893.1566366443; __qca=P0-2008130179-1566366444101; _hjid=e4e61cb6-dac9-468b-90e7-881beebd50a4; _fbp=fb.1.1571268764166.678986027; __gads=ID=1f0f77699f259394:T=1571268765:S=ALNI_MauXf9rYg7Z-VvUMeshYUfPzibvgA; OB-USER-TOKEN=964583a6-3407-4116-ae8c-5c9198205262; _gid=GA1.2.2103139025.1572506355; PHPSESSID=r1ah8kjp16nvu5u2qi8bdoq2sc; StickySession=id.46489073211.560_m.investing.com_StickyMobile; searchedResultsMobile=[{"href":"/currencies/aud-cad","pairId":47,"title":"AUD/CAD","subtitle":"Australian Dollar Canadian Dollar","footerTitle":"Currency"}]; geoC=PE; fpros_popup_mob=1572555384; _gat=1; _gat_allMobileSitesTracker=1; _gat_allSitesTracker=1; nyxDorf=MjY0bmI0N3U2YmhnZzY4JGIyMGg2LzMwYmNlYg%3D%3D Host: m.investing.com Referer: https://m.investing.com/currencies/aud-cad Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36 X-Requested-With: XMLHttpRequest

Query String parameters: volume_series: yes events: no candle_count: 40 pair_interval: 300 chart_type: candlestick pair_id_for_news: 0 pair_id: 47 symbol: AUD%2FCAD showECEvents: false




List for International Developer Websites: Programming News, Tutorials & More

I'm trying to make a list of the best international developer websites (non-U.S.): programming news, tutorials & more. Any recommendations??




Can't get i from for ((i = 0; i < koniec.length; i++) to index thru console.log(silnia(5)[i]);

In my JS script, I am trying to index thru silnia() a function that returns an array, I can do that manually without a problem: silnia(5)[1] but when I try to use an i from a for-loop it does not work.

koniec = [1,2,3];

for (i = 0; i < koniec.length; i++){
    // Returns only undefined:
    console.log(silnia(5)[i]);

    // Works no problem:
    // console.log(silnia(5)[2]);
}


function silnia(n){
    var wynikSilni = [];

    for(i = 1; i < (n + 1); i++){
        wynikSilni.push(i);
    }

    return wynikSilni;    
}




Javascript listen to browser window

Assume you have a few browser tabs open, for which you are waiting for an event.

Can you have Javascript listening on a particular open browser window, and acting on certain events (e.g displaying a message, focusing that window etc.)?

Does anyone have an example on how it's done?




What does one need to know to create a website? What are the steps?

I have a lot of questions and I don't truly know where to ask them so here we are. The assumption is that the website that a user wants to create is a newspaper website (example theoutline.com, wired.com). (Optional) How would it change if it's a social media website like facebook.com?

Along the process of web development: 1. (What is the starting point?) Do web developers start from scratch usually? Would a good web developer use platforms such as wordpress? webflow? wix? etc.

  1. (What knowledge do you need?) What technologies you need to know to create a website. What would a user need to know except HTML, CSS? Is javascript the only option or are there alternatives to it? Is Python an alternative to javascript?

  2. (Uploading and page maintenance?) What happens after a user has developed the code for the website and it is all stored in folders? Does one just upload everything copy-paste style? How do you go about adding new content? Let's say it's a newspaper publication. How do you upload a new article in that scenario? Would you have to change the HTML, CSS every time to include the new article?

Please be as detailed as you can be and as much as time allows. I'm sure a lot of other people have the same questions and clear answers would be very helpful. Thank you!




What type of database is it better to use and how to implement it

I'm making a program to track the jobs I'm making and I'm using Microsoft access for a local db and so far it works as intended, but then it occurred to me that when I'm home and I want to do some work I wouldn't be able to connect to the same db (I know there's workarounds to do that but I would prefer not to do that) and then I was thinking that later on I would like to do a web app where my customers could also track the progress of their repairs and that won't be possible using the local db I'm using. So hopefully there's a n easy answer to this question. What type of database I need to use in order to connect my 2 PCs with the visual basic program and also the web app having some room for improvement like maybe an iOS app and APK down the road. Also I don't have a server but I have a WIP website using bluehost for hosting if that helps. Thanks in advance.




In django, how do you create many to many relationshipd between models

Say i have 3 models (Actor, Movie and Series) defined like this:

class Actor(models.Model):
    name = charField...
    date_of_birth = ...
    filmography = (list of Series and Movie objects)

class Movie(models.Model):
    name = ...
    genre = ...
    cast = (list of Actor objects)

class Series(models.Model):
    name = ...
    no_of_eps = ...
    cast = (list of Actor objects)

How do i make a many to many relationship between 'actor and movie' and 'actor and series' where actor can store a number of movies and tv shows in its filmography field and movie and series can store a number of actors in there respective cast fields.

(Ignore lack of inheritance for movie and series unless it's the only solution)




How do browsers determine what data to clear in a time range?

My question is more related to cookies. When we clear browser data for a specific time range, let's say "last hour", how do browser know what to delete? If I change a cookie value(but keep the name) does it get deleted? What if I change just the expiry, does it get deleted too?




Image Optimization for Web Developement

I am building a section in my website where I will be including a mail image. The image will be small and I am using this because I wasn't able to find out how to include fontawesome.com into my website. So here's my question. Would there be any difference in the performance of the website whether I use icons from fontawesome or images from the web? The next part of the question, is if the answer is it's better to use icons from fontawesome.com, how can I use it perhaps cdn? And if the answer is image or it doesn't matter, would be okay to use the online url of the image or have it locally. For me, as long as the performance difference isn't too big it's fine.

I don't have any codes to include




Can I use Flutter do develop full fledged web apps?

Flutter has released its tech preview for web development. Will it be a good choice to proceed with professional web development?




How do I connect my Postgresql server with the website that I created via Wix?

I just created a website with Wix.com. For the project that I am working on, I need to use my Postgresql database server with that website that I made. Do you have any idea about how to do it?




How to associate events from a webview react native

Good morning community. I wanted to ask a conceptual question to know where I should attack this problem. I was asked as a new requirement that a native application developed in react native now use a webview that contains the web page we have previously made, however not only is the application requested to be a webview that shows our web page, but also has to be able to make use of the telephone accounts, for example the camera (in case of reading a qr code), the vibration of the telephone, and to be able to store session within an async storage but not on the web but on the telephone. The problem is that I don't know how to associate an event that happens on the webview with an action that I have to make the phone like asking for permission to use the camera. I hope you can guide me on the right path because I'm quite disoriented




Image in a web project

How do you fix the size of the image in this code? If you see it in my project,this is coming just in the middle of my footer,between the instagram icon nd my h6. I also would like to ask some tips for the title,I find it bit boring,could you help me with this please guys! How do you fix the size of the image in this code? If you see it in my project,this is coming just in the middle of my footer,between the instagram icon nd my h6. I also would like to ask some tips for the title,I find it bit boring,could you help me with this please guys!

<!DOCTYPE html>
<html>
<head>
     <title>This is London</title> 
     <link rel="stylesheet" type="text/css" href="css/style.css">
     <link href="https://fonts.googleapis.com/css?family=ZCOOL+XiaoWei&display=swap" rel="stylesheet">
</head>
<body>

<div id="nav">
<ul>
  <li><a class="active" href="#home">Home</a></li>
  <li><a href="#gettingaround">Getting around</a></li>
  <li><a href="#about">About</a></li>
  <li><a href="#contact">Contact</a></li>
</ul>
</div> <!-- End of nav -->

<div id="header">

  <div id="header-text">
      <h2>
        Visiting London has never been easier with these ideas.
      </h2>
      <p>The capital of the United Kingdom is a thriving multicultural metropolis. The contrast between the spectacular historic sights and the lively cultural scene makes a visit to London an interesting and exciting adventure. </p>
  </div> <!-- End of header-text -->
</div> <!-- End of header -->


<div id="middle">
  <div id="mid-text">
       <h1>- Getting around in London -</h1>
       <h5>One of the world's most visited cities, London has something for everyone: from history and culture to fine food and good times.</h5>
       <p>Immersed in history, London's rich seams of eye-opening antiquity are everywhere. The city's buildings are striking milestones in a unique and beguiling biography, and a great many of them – the Tower of London, Westminster Abbey, Big Ben – are instantly recognisable landmarks. There’s more than enough innovation (the Shard, the Tate Modern extension, the Sky Garden) to put a crackle in the air, but it never drowns out London’s seasoned, centuries-old narrative. Architectural grandeur rises up all around you in the West End, ancient remains dot the City and charming pubs punctuate the historic quarters, leafy suburbs and river banks. Take your pick.

          Art & Culture
          A tireless innovator of art and culture, London is a city of ideas and the imagination. Londoners have always been fiercely independent thinkers (and critics), but until not so long ago people were suspicious of anything they considered avant-garde. That’s in the past now, and the city’s creative milieu is streaked with left-field attitude, whether it's theatrical innovation, contemporary art, pioneering music, writing, poetry, architecture or design. Food is another creative arena that has become a tireless obsession in certain circles.

          Diversity
          This city is deeply multicultural, with one in three Londoners foreign-born, representing 270 nationalities and 300 tongues. The UK may have voted for Brexit (although the majority of Londoners didn't), but for now London remains one of the world's most cosmopolitan cities, and diversity infuses daily life, food, music and fashion. It even penetrates intrinsically British institutions; the British Museum and Victoria & Albert Museum have collections as varied as they are magnificent, while the flavours at centuries-old Borough Market run the full global gourmet spectrum.

          A Tale of Two Cities
          London is as much about wide-open vistas and leafy landscape escapes as it is high-density, sight-packed urban exploration. Central London is where the major museums, galleries and most iconic sights congregate, but visit Hampstead Heath or the Queen Elizabeth Olympic Park to flee the crowds and frolic in wide open green expanses. You can also venture further out to Kew Gardens, Richmond or Hampton Court Palace for beautiful panoramas of riverside London followed by a pint in a quiet waterside pub.</p>

      <div id="img-mid">

          <a href="https://goo.gl/maps/PSDhvQ25fRZBqWHC8" target="_blank">
                <img src="images/Feature-images.jpg" alt="Map">
            </a>

      </div><!-- End of img-mid -->
    </div> <!-- End of mid-text -->

</div> <!-- End of middle -->



<div id="footer">
    <div class="credits">
            <div class="credits_left">

              <h6> Designed by Alba Heidari</h6>


            </div>
     <div class="credits_right"><a href="https://www.instagram.com/albaheidari/" target="_blank" alt="Instagram @alba"><img src="https://www.arct.cam.ac.uk/images/instagram-icon/image" class="social_icon"></a>



    </div>

</div> <!-- End of footer -->
</body>
</html>



What does this schema mean bank://x-bank-app

enter code hereI'm using a WebView in flutter. I'm using this plugin from @pichillilorenzo. Basically clicking a link brings the user to a webpage. All good. But once in the webpage(in the webview)if the user clicks a button (from the web page)a browser open up. And the 'url' is of the form bank://x-bank-app.... The browser of course doesn't recognise the schema and return an error. I presume the website can tell the user is on a mobile device and this schema is to send the user to the app on the phone? My question is what is this schema? And is there a way I can prevent it from loading ?




Unable to test restful service

I am very new to Restful Services and I followed some guidelines given be the boss to make it. When I am using the URL to test it via browser, it shows not found. Console is not showing any error or exception (However, I removed almost 100 errors to reach this point), but still the result is same.

This is my directory structure

This is my RDRresource.java (Includes the service I want to test)

package org.uclab.IMP.rs.rdr;

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.uclab.IMP.*;
import com.google.gson.Gson;

import org.uclab.IMP.datamodel.*;
import org.uclab.IMP.datamodel.RDR.*;
import org.uclab.IMP.datamodel.RDR.dataadapter.*;



/**
 * Facade for the Restful Web service to handle the data curation functions 
 */
@Path("rdr")
public class RDRresource {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of DataCurationResource
     */
    public RDRresource() {
    }

    private static final Logger logger = LoggerFactory.getLogger(RDRresource.class);
    /**
     * This function is using to get user by ID 
     * @param UserID
     * @return a list of object Users with "Error", "No Error" and new added ID
     */
    @GET
    @Produces("application/json")
    @Consumes("application/json")
    @Path("RetriveRules")
    public List<Rules> RetriveRules() {
        Rules objOuterRules = new Rules();
        List<Rules> objListRules = new  ArrayList<Rules>();
        try
        {
            objOuterRules.setRuleID(Long.parseLong("RuleID"));
            DataAccessInterface objDAInterface = new RuleDataAdapter();
            AbstractDataBridge objADBridge = new DatabaseStorage(objDAInterface);
            objListRules = objADBridge.RetriveRules();
            logger.info("Get all rules successfully, rules Details="+objOuterRules);
        }
        catch(Exception ex)
        {
            logger.info("Error in getting user");
        }
        return objListRules;
    }    

This is my web.xml file

<web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>Restful Web Application</display-name>

    <servlet>
        <servlet-name>jersey-serlvet</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>org.uclab.IMP.rs.rdr</param-value>
        </init-param>


        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>jersey-serlvet</servlet-name>
        <url-pattern>/webresources/*</url-pattern>
    </servlet-mapping>

</web-app>

URL I am trying and result is here

I will be thankful if someone can guide me through.




Scrap table from windguru

I have tried to scrap tables from www.windguru.com but i can't find the table using BeautifulSoup. Can anyone please help me with this. Here is my code:

import requests
from bs4 import BeautifulSoup
url = "https://www.windguru.cz/archive.php?id_spot=49308&id_model=3&date_from=2012-01-01&date_to=2012-12-31"
page = requests.get(url)
soup = BeautifulSoup(page.content, 'html.parser')
tb = soup.find('table', class_='forecast daily-archive')



Android WebView How to put data in Web forms programmatically?

I have to fetch a link from an API and show it to the User via WebView, where user can place an order on third party site, well I have all the information about the user like name, location & address, contact.

I want to put all the data from the variables to a form in this site.

Site: Example link

So when you click on the above link, add couple of items in your cart, and click next on the second page, I want to put the data in the forms.

How can i achieve this?




mercredi 30 octobre 2019

Why i see website different as www and http

As in title, as you can see www.qwef.pl and http://qwef.pl are different, i mean just look at navbar.. any ideas? I want to make it look like in http version..




Sending large volume of account activation emails without getting blocked?

A white ago, I had to develop a website for a company. It reqires account registration, activation, then logging into the system to fill a form, ect. This was proposed to reduce spam and fake data entry.

What I did not expect is that: within 5 days I got over 16,000 account registered (only about 8000 was actual users). Sending activation email started to fail soon after the site started due to the email account being blocked as a result of high volume of emails.

I checked amazon simple email service and they only offer 200 email to be send by day. I asked them raising the email limit to 5000 per day, but my query was refused.

I had to cancel the activation process in the end. My question is: what is the best way to send very large volume emails (for account activation). Also is there another way to do it to avoid email issues?

Any advice is highly appreciated




Problem getting index.php and style.css to be used in all subdirectories in Apache website

In an Apache website running on WAMP, I am trying to set a single 'style.css' and 'index.php' file to work in every folder level in one of the website folders named documents.

Everything looks and displays perfect as long as I put a separate copy of 'index.php' and 'style.css' in every subfolder in the documents directory. The site has its own 'styles' folder that contains all the other css files used elsewhere on the site but I cannot find the right place to set things such that the specific set of items needed for the 'documents' folder will work for every sublevel of each folder inside 'documents'.

It uses the Apache directory listing default style.css and index.php as soon as I drop down beyond the top directory level. I need everything in the documents folder to only use the one style.css and index.php file that were created for it

Any advice appreciated because i am not good at CSS and don't know what would fix this.




Print HTML through JS without Default Header and Footer From Browser

Is it possible to print an HTML page without the header and footer from the browser? i.e. URL and date. Trying to use window.print() and it doesn't look like I can get rid of that. I know I can use a PDF library, but looking to make sure that this can't be done through JS first.




Go - How to interrupt HTTP handler?

Say I have a http handler like this:

func ReallyLongFunction(w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Hello World!")

        // run code that takes a long time here

       //more code here

})

Is there a way I can interrupt this function if the user refreshes the page or kills the request some other way without running the subsequent code and how would I do it?

I tried doing this:

notify := r.Context().Done()
        go func() {
            <-notify
            println("Client closed the connection")
            s.downloadCleanup()
            return
        }()

but the code after whenever I interrupt it still runs anyway.




How to make an endless scrolling react component?

So basically, I am looking more for suggestions than a step by step guide. I have seen this somewhere before, when you scroll to the bottom of the page, the component reappears at the bottom and the user is tricked into thinking they are scrolling forever.

This should be seamless, and should not jump the scroll bar to the top of the page. I'm not sure how to go about implementing a feature like this. Any thoughts?




I want to design a android application and integrate it using API with my website, which is designed in php [closed]

I have created a website using PHP as the backend language and have used databases mySQL through phpmyAdmin. Now i want to develop a mobile application for the same. The front end of the mobile application is written using xml and java(it is a android app). Now what i should do so that both the applications(web and mobile) should use the same database ? Basically i want the two to be integrated. How to do it?




How to get County and co-ordinates using address in mapbox API

How to get County and co-ordinates using address in mapbox API? How to use mapbox endpoints in API?




How do I echo the text that the user entered?

So instead of echo "Invalid specialization entered. Please check your spelling.";

I would like to echo "[THE TEXT THAT THE USER ENTERED] is not a valid spec."

All help appreciated. Tell me if I was not clear and if you need more info.

if (
$spec == "Protection" || $spec == "Arms" || $spec == "Fury" ||
$spec == "Shadow" || $spec == "Discipline" || $spec == "Holy" || 
$spec == "Frost" || $spec == "Fire" || $spec == "Arcane" ||
$spec == "Destruction" || $spec == "Demonology" || $spec == "Affliction" || 
$spec == "Subtlety" || $spec == "Combat" || $spec == "Assassination" || 
$spec == "Restoration" || $spec == "Feral" || $spec == "Balance" || $spec == "Guardian" ||
$spec == "Enhancement" || $spec == "Restoration" || $spec == "Elemental" ||
$spec == "Marksmanship" || $spec == "Beast Mastery" || $spec == "Survival")



{
    echo "<br>";
    echo "Valid spec entered.";
}


else {  
    echo "<br>";
    echo "Invalid specialization entered. Please check your spelling.";
}`



deadlock in SpringMVC with EhCache

In the last two or three days, a website deployed on our tomcat service found a thread deadlock issue.After troubleshooting and analysis the JVM thread dump,we found a large thread blocks in work thread and this problem may be caused by ehcache. However, I believe that the usage of our ehcache is correct, can anyone help me to analyze the reasons?

The code and configuration of our program, log and other information is as follows,Thanks:

version:ehcache 2.10.3 ehcache-core 2.6.11 shiro-ehcache 1.2.4

src code:

@Service

public class UserBuslinesService {
    @Resource
    UserBuslinesDao userbuslinesDao;

    public List<UserBuslines> find(Map paraMap) {
        return userbuslinesDao.find(paraMap);
    }
    @Cacheable(value={"UserBuslines"}, key = "#map")
    public List<UserBuslines> select(Map map) {
        List<UserBuslines> oList = userbuslinesDao.select(map);
        return oList;
    }



    public List<UserBuslines> selectAll(Map map) {
        List<UserBuslines> oList = userbuslinesDao.selectAll(map);
        return oList;
    }

    public UserBuslines get(Serializable id) {
        return userbuslinesDao.get(id);
    }

    @CacheEvict(value={"UserBuslines", "CarInfoTree"}, allEntries=true)
    public void insert(UserBuslines entity) {
        userbuslinesDao.insert(entity);
    }

    @CacheEvict(value={"UserBuslines", "CarInfoTree"}, allEntries=true)
    public void update(UserBuslines entity) {
        userbuslinesDao.update(entity);
    }

    @CacheEvict(value={"UserBuslines", "CarInfoTree"}, allEntries=true)
    public void deleteById(Serializable id) {
        userbuslinesDao.deleteById(id);
    }

    @CacheEvict(value={"UserBuslines", "CarInfoTree"}, allEntries=true)
    public void deleteByIds(Map paraMap) {
        userbuslinesDao.deleteByIds(paraMap);
    }
    @CacheEvict(value={"UserBuslines", "CarInfoTree"}, allEntries=true)
    public void delete(Serializable[] ids) {
        userbuslinesDao.delete(ids);
    }
}


-----------------------------------------------------------------------------------

    @ResponseBody
    @RequestMapping(value = "/SelectLastestGpsData", method = RequestMethod.POST)
    public Map<String, Object> SelectLastestGpsData(Integer[] firstCorp, Integer[] corpIdList, Integer[] buslineIdList, String[] simNoList, HttpSession session) {
        List<LastestGpsData> lastestGpsDataList;
        List<CarInfoTree> carInfoTreeList = new ArrayList<>();
        Map<String, Object> key = new HashMap<String, Object>() {
            {
                put("platforms", Arrays.asList(platform.replaceAll(" ", "").split(",")));
            }
        };

        Object cacheByCarTree = EhcacheUtil.getInstance().get("CarInfoTree", key);
        if (cacheByCarTree != null) {
            carInfoTreeList = (List<CarInfoTree>) cacheByCarTree;
        }
        Map<String, Object> queryUserBuslinesMap = new HashMap<>();
        queryUserBuslinesMap.put("userId", session.getAttribute("UserId"));
        List<UserBuslines> userBuslinesList = userBuslinesService.select(queryUserBuslinesMap);


        List<CarInfoTree> targetCarInfoList = carInfoTreeList
                .stream()
                .filter(
                        e -> (firstCorp != null && Arrays.asList(firstCorp).contains(e.getParentId())) ||
                                (corpIdList != null && Arrays.asList(corpIdList).contains(e.getCorpId())) ||
                                (buslineIdList != null && Arrays.asList(buslineIdList).contains(e.getBuslineId())) ||
                                (simNoList != null && Arrays.asList(simNoList).contains(e.getSimNo()))
                ).filter(car -> userBuslinesList.stream().anyMatch(ub -> ub.getBuslineId() == car.getBuslineId()))
                .collect(Collectors.toList());

        lastestGpsDataList = selectLastestGpsData(targetCarInfoList);


        Map<String, Object> result = new HashMap<>();
        result.put("rows", lastestGpsDataList);
        if(lastestGpsDataList.size()>0){
            //EhcacheUtil.getInstance().put("gnssData", session.getAttribute("UserId"), lastestGpsDataList);
            storageHashMap.put(session.getAttribute("UserId"), lastestGpsDataList);
        }

        return result;
    }

thread dump:

"http-nio-6600-exec-189" #25494 daemon prio=5 os_prio=0 tid=0x0000000020336000 nid=0x1f40 waiting for monitor entry [0x000000002eecd000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.get(OnHeapCachingTier.java:331)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.access$200(OnHeapCachingTier.java:311)
    at net.sf.ehcache.store.cachingtier.OnHeapCachingTier.getValue(OnHeapCachingTier.java:299)
    at net.sf.ehcache.store.cachingtier.OnHeapCachingTier.get(OnHeapCachingTier.java:199)
    at net.sf.ehcache.store.CacheStore.get(CacheStore.java:192)
    at net.sf.ehcache.Cache.get(Cache.java:1751)
    at org.springframework.cache.ehcache.EhCacheCache.get(EhCacheCache.java:65)
    at org.springframework.cache.interceptor.AbstractCacheInvoker.doGet(AbstractCacheInvoker.java:68)
    at org.springframework.cache.interceptor.CacheAspectSupport.findInCaches(CacheAspectSupport.java:469)
    at org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:435)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:336)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:654)
    at com.xmgnss.service.UserBuslinesService$$EnhancerBySpringCGLIB$$d0f3eb42.select(<generated>)
    at com.xmgnss.controller.LastestGpsDataController.SelectLastestGpsData(LastestGpsDataController.java:294
    at sun.reflect.GeneratedMethodAccessor380.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at com.xmgnss.filter.XssFilter.doFilter(XssFilter.java:28)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    - locked <0x000000008c40c870> (a org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
    - <0x000000008b6443a0> (a java.util.concurrent.ThreadPoolExecutor$Worker)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - locked <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)
    - waiting to lock <0x000000008b5e3bc8> (a net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault)

    Line 3187:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 3274:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 3361:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 3448:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 6984:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 7091:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 7404:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 7602:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 7915:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8002:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8089:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8176:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8485:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8572:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 8841:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9023:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9292:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9379:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9692:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9779:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 9866:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 10250:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 10428:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 10515:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 10602:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 10689:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11049:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11136:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11223:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11310:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11397:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11484:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11571:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11749:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 11927:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12105:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12192:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12279:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12366:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12453:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12540:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12627:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 12714:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13074:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13161:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13248:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13335:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13422:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13509:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13596:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 13683:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14043:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14130:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14217:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14304:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14482:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14569:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14656:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14834:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 14921:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15008:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15186:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15273:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15360:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15447:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15534:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15621:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15708:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15795:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15882:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 15969:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16056:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16234:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16321:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16408:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16495:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16582:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16760:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16847:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 16934:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17112:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17199:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17286:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17373:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17460:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17547:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17634:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17721:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17808:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17895:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 17982:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18069:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18247:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18334:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18421:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18508:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18595:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18864:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 18951:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19038:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19125:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19212:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19299:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19386:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19473:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19560:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19647:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19734:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19821:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19908:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 19995:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20082:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20169:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20256:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20434:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20521:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20608:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20695:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 20964:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21051:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21138:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21225:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21312:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21399:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21486:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21573:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21751:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21838:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 21925:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22107:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22194:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22281:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22560:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22647:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 22734:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 23012:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 23291:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 23378:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 23465:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 23738:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24007:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24190:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24277:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24364:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24451:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24538:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 24927:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25014:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25101:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25188:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25275:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25457:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25637:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25910:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 25997:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 26084:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 26266:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 26353:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 26638:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 27048:    java.lang.Thread.State: BLOCKED (on object monitor)
    Line 27231:    java.lang.Thread.State: BLOCKED (on object monitor)
<ehcache>
    <diskStore path="D:/xiaoyuchuan/cache" />
    <defaultCache
            maxElementsInMemory="1000"
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="false"/>
    <cache name="CarInfoTree"
           maxElementsOnDisk="0"
           maxElementsInMemory="20000"
           eternal="true"
           overflowToDisk="true"
           diskPersistent="true"/>
    <cache name="UserBuslines"
           maxElementsOnDisk="20000"
           maxElementsInMemory="2000"
           eternal="true"
           overflowToDisk="true"
           diskPersistent="true"/>
    <cache name="gnssData"
           maxElementsOnDisk="0"
           maxElementsInMemory="2000"
           eternal="true"
           overflowToDisk="true"
           diskPersistent="true"/>
</ehcache>

The VisualVM Thread View




i can not send image via whatsapp url form my website

<html>

Share with whatsapp

enter code here
var fakeLink = document.createElement('button'); fakeLink.setAttribute('href', 'whatsapp://send?phone=9609127243&text='+encodeURIComponent(https://ift.tt/2NqNRTs); fakeLink.setAttribute('data-action', 'share/whatsapp/share'); fakeLink.click();


Redirecting non-www to www but keeps the vanity URL

I'm trying to redirect a non-www to www but this time I want to keep the vanity URL. I've tried to search this over the internet but no luck at all.

So, here's the example I want to achieve:

http://exampledomain.com/vanity-url -> https://www.exampledomain.com/vanity-url

I've tried this code but it is deleting the vanity URL.

Redirects non-www to www

RewriteEngine On
RewriteCond %{HTTP_HOST} ^anderssorman-nilsson.com [NC]
RewriteRule ^(.*)$ https://www.anderssorman-nilsson.com/$1 [L,R=301]

Any help would be very much appreciated.




mardi 29 octobre 2019

Facing an issue with Magento 2.2.9 version

I am facing an issue with Magento 2.2.9 version.

My sites get down every 2-3 days. It doesn't show any error on upfront, the browser keeps on loading for a very long time, but no data appears. When I check the apache error logs I found Max Request Workers limit exhausted. For the last 10 days, I am increasing the same the frequency is increased to 5days but still getting down. The site was launched 45 days ago, running perfectly for 30 days. Even we have not observed any hike in the traffic. The site is hosted at AWS plan is t2.2xlarge.

Please help!




How to give a div max auto width?

Hello i would like to give my div ("menu-content") an auto full width. My first div is auto-width by the text lenght and i want "menu-spacer" to take the maximum size it could get.

Here is the html

    <div class="wrapper container w-50">
  <div class="wrapper menu block">
    <div class="menu-content">Un menu tout à fait normal</div>
    <div class="menu-spacer"></div>
  </div>
  <div class="price block">50€</div>
</div>
<div class="wrapper container w-50">
  <div class="wrapper menu block">
    <div class="menu-content">Un menu</div>
    <div class="menu-spacer"></div>
  </div>
  <div class="price block">50€</div>
</div>

.wrapper {
  display: flex;
}

.menu-content {
  width: ;
}

.menu-spacer {
  width: 100vw;
  border-bottom: green 2px dotted;
}

.menu {
  width: 80%;
  text-align: left;
  color: black;
  padding-bottom: 0px;
}

.price {
  width: min-content;
  text-align: right;
  color: black;
}



Is it cheating to use a code generator like webflow?

Is it cheating to use a webdevelopment tool like webflow to generate front side code or is it just another tool?




json_encode en php JSON in PHP

I need to convert this string to an array of objects please help

this is the example the strin contains this

[{"codigo":"123","cantidad":"1","precio":"10"},{"codigo":"123","cantidad":"1","precio":"10"}]




How can I get the on screen keyboard for flutter web apps running on a touch screen

I am building flutter for the web, and I want to use it on a touch screen. My app runs great and takes input from the mouse, but when I want to use a text input field the app works with the physical keyboard that I have attached since I'm running in chrome on my Macbook. I would like to use this web app on a touch screen kiosk type of setup though so I wanted to always bring up the virtual (on screen) keyboard for text entry.

I tried:

  @override
  void initState() {
    SystemChannels.textInput.invokeMethod('TextInput.show');
    super.initState();
  }

And this does force open the virtual keyboard if I run on a virtual tablet for example, but didn't work for me when I ran the exact same flutter app in chrome.

I'm running with v1.9.1+hotfix.3-pre.1, on Mac OS X 10.14.6 18G103

Does Anyone know a way to force flutter to always use virtual on screen keyboard?




Use subdomain to mask URL on the top-level domain (specific page)

I was a little hesitant to ask since there is a wealth of knowledge on this topic, but am having a bit of trouble finding the specific case example here.

I have a form on one of my domains, and I want to setup a subdomain that will bring up that form w/o redirecting the url to the other domain.

form: mydomain.com/my-form sub-domain: enter-your-data.mydomain.com

I want the guest to go to (and end up at) enter-your-data.mydomain.com and fill out the form there. But the form is being run by mydomain.com

I don't have access to apache in this case so I've got limited (no) ability to setup a virtual host.

I do have access to rewrite rules which is how I think it can be done, but having issues where the url doesn't get rewritten.

I could do as an iframe but thats kind of a lousy way.

I could do something via php, but am looking for a "cleaner" way.

Thanks for your advise!




Extract Facebook Video Playlist

I have a page on facebook and continuously upload videos of news on it. I am building a website now for it and want to link the facebook page to it to fetch data from facebook. I know I can embed a single video from facebook, I know I can embed the whole videos folder form facebook.

The thing is on facebook in my videos I have divided them into different categories and on my website each of these categories is a page.

How can I get an embed code for a specific category in my facebook videos so I can add it to its relevant page and only display videos in that category and not have to show all my facebook videos on the same page on my website?




ASP.NET POST receive issue

I have a following method in the Controller Api

[HttpPost]
public string TestMethod()
{
    var nvc = Request.Form;

    return Request.HttpMethod + " | " + string.Join("&", nvc.AllKeys.Select(a => a + "=" + HttpUtility.UrlEncode(nvc[a])));
}

When I do the POST request from the browser, it works properly, but if I try to send the POST using C#, ASP returns 404 error If I remove [HttpPost] before the method, ASP will tell that i am trying to make a GET request.

string url = "https://localhost:44300/Api/TestMethod";
        Dictionary<string, string> pars = new Dictionary<string, string>();
pars.Add("a", "b");
pars.Add("c", "d");
pars.Add("e", "f");
Console.WriteLine(POST(url, pars));

I've tried to manipulate with headers, but it was useless. Here's my POST method

static string POST(string url, Dictionary<string, string> parameters)
{

    HttpWebRequest hwr = (HttpWebRequest)WebRequest.Create(new Uri(url));
    hwr.KeepAlive = false;
    hwr.Method = "POST";
    hwr.ContentType = "application/x-www-form-urlencoded";
    hwr.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0";

    byte[] data = Encoding.UTF8.GetBytes(MakeQueryString(parameters));
    hwr.ContentLength = data.Length;

    using (Stream reqStream = hwr.GetRequestStream())
    {
        reqStream.Write(data, 0, data.Length);
    }

    string result;

    using (HttpWebResponse response = (HttpWebResponse)hwr.GetResponse())
    {
        using (StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8")))
        {
            result = sr.ReadToEnd();
        }
    }

    return result;
}

UPD 1: I send POST request using RESTClient for Firefox; UPD 2: My C# method works for other websites




Can a website record if you have downloaded a font from the sources and get details about you?

If one was to go to the sources while inspecting a website and download a font from there. Would the owner of the website be able to track the download and identify who downloaded it?




Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0"

Plase any help i have this eror Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0". Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0".

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0".] System.Web.WebPages.Deployment.PreApplicationStartCode.StartCore(IFileSystem fileSystem, String appDomainAppPath, String binDirectory, NameValueCollection appSettings, IEnumerable1 loadedAssemblies, IBuildManager buildManager, Action1 loadWebPages, Action registerForChangeNotification, Func`2 getAssemblyNameThunk) +14993 System.Web.WebPages.Deployment.PreApplicationStartCode.StartCore() +180 System.Web.WebPages.Deployment.PreApplicationStartCode.Start() +40

[InvalidOperationException: The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0"..] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func1 setHostingEnvironmentCultures) +646 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +147 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +107 System.Web.Compilation.BuildManager.ExecutePreAppStart() +165 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +590

[HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Specified Web Pages version "3.0.0.0" could not be found. Update your web.config to specify a different version. Current version: "2.0.0.0"..] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10083568 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263

<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=301879
  -->
<configuration>
  <configSections>
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <!--<connectionStrings>
    <add name="DefaultConnection" connectionString="Server=94.73.151.146;Database=u8441088_db613;Uid=u8441088_u844108;Pwd=BCoa83F2;charset=utf8;" providerName="MySql.Data.MySqlClient" />
  </connectionStrings>-->
  <connectionStrings>
    <add name="DefaultConnection" connectionString="Server=localhost;Database=u8441088_uygulam;Uid=u8441088_uygulam;Pwd=EEla71J0;charset=utf8;" providerName="MySql.Data.MySqlClient" />
  </connectionStrings>

  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <customErrors mode="Off"></customErrors>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.6.1" />
    <httpRuntime targetFramework="4.6.1" />
    <httpModules>
      <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" />
    </httpModules>
  </system.web>
  <system.webServer>
    <modules>
      <remove name="FormsAuthentication" />
      <remove name="TelemetryCorrelationHttpModule" />
      <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="managedHandler" />
    </modules>

  <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
        <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-8.0.18.0" newVersion="8.0.18.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Google.Apis" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.40.0.0" newVersion="1.40.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Google.Apis.Auth" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.40.0.0" newVersion="1.40.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Google.Apis.Core" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.41.1.0" newVersion="1.41.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.4.0" newVersion="1.2.4.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.10.0.0" newVersion="3.10.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>


  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />

    <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.10.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
      </provider></providers>
  </entityFramework>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
    </compilers>
  </system.codedom>
</configuration>```



I have php mail script but it is not being working Please help me

I want to know what is the error in this scripts this script is sending mails.

  <?php

    $to = "sufyanaslam234@gmail.com"; // this is your Email address
    $name = $_POST['name'];
    $email = $_POST['email'];
    $date = $_POST['date'];
    $phone = $_POST['phone'];
    $subject = "New message from Landing Page";

    $message = " Name: " . $name . "\r\n\r\n Email Address: " . $email . "\r\n\r\n Test Date Requested: " . $date . "\r\n\r\n Phone Number: " . $phone;
    'Reply-To:' . $to . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    // Always set content-type when sending HTML email
    // $headers = "MIME-Version: 1.0" . "\r\n";
    // $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

    // // More headers
    // $headers .= 'From: <webmaster@example.com>' . "\r\n";
    // $headers .= 'Cc: myboss@example.com' . "\r\n";



    // mail($to,$subject,$message);


    mail($to,$subject,$message,$headers);
    header('Location: thank-you.html');


?>



How to scrape data from website using web-scraping and store them in DJANGO models to display them later in HTML file

I am creating a University Forum using DJANGO Framework. In one of its modules, i have to scrape data from different university websites, (data contain fee structure and program offered, etc) and then store that data in DJANGO Models and then display it in HTML.. how it is possible.this is a website link "http://nu.edu.pk/Admissions/FeeStructure" thank you




how to resize image so that it becomes icon

I have an image which is of dimensions 490*307. This image is to be used as an icon of size 24px*15px for the website. How to resize the image so that it becomes of the smaller size without losing the quality of the image? I want the solution for many images(provided by designers) which are too large in size but the size is to be reduces so that it can be used as logo or icon on the html website.

I have used many online free tools. But none of them result in required quality. All the images are blurred enough to e used as the icon. I don't have any paid software such as Photoshop etc.




scraping web page's links info

I deal woth this website https://www.ntsb.gov/investigations/AccidentReports/Pages/railroad.aspx I want to get from each brief report (like "​Railroad Accident Brief: Dallas, Garland & Northeastern Railroad" and "​Railroad Accident Brief: Derailment of Metro-North Railroad Commuter Train Rye, New York Employee Fatality") Executive Summary and craete a dataset using scrapy. Im new at using scrapy, so maybe im on a wring path of solving a problem, but i tried this:

scrapy shell
fetch('https://www.ntsb.gov/investigations/AccidentReports/Pages/railroad.aspx')
response.css(".ms-vb reporttitle::text").extract()

I thought its gonna bring all info from subpages, but its empty. How could i fix it?




The scroll bar and stretched to the height of the screen

I need the scroll bar to appear in the first div if its contents are higher than the screen size. And the second div was stretched along the height of the screen.

How can I add a scrollbar to the first div? "overflow: scroll;" does not work.

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.container-fluid{
  flex: 1;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<div class="container-fluid d-flex">
  <div class="row flex-fill">
    <div class="col-6" style="overflow: scroll;">
<form>
<table class="table">
  <thead>
    <tr>
      <th scope="col">1</th>
      <th scope="col">2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>11</td>
      <td>22</td>
    </tr>
    <tr>
      <td>11</td>
      <td>22</td>
    </tr>
    <tr>
      <td>11</td>
      <td>22</td>
    </tr>
    <tr>
      <td>11</td>
      <td>22</td>
    </tr>
  </tbody>
</table>
</form>
</div>
    </div>
    <div class="col-6 bg-success">
    </div>
  </div>
</div>



Python -- Display headlines online using Flask and news api

I am wondering how I could display top headlines on a webpage using the news api and flask.

from newsapi import NewsApiClient
from flask import Flask


app = Flask(__name__)
newsapi = NewsApiClient(api_key='c732639b55f241f2acdf147fb646bf51')

data = newsapi.get_top_headlines(sources='bbc-news', language='en')


@app.route("/")
def home():
    return data

if __name__ == "__main__":
    app.run(debug=True)

This returns the dictionary containing all the keys such as title, author, date etc etc.. How can I display this dictionary as a list of headlines onlines?

Thanks so much




Change Page-Title with PHP

Im completely new to PHP and have a simple questions. The first thing I have to solve is to change the Page-Title on my HTML-Website with PHP. Yes it has to be PHP or something that runs before the HTML is showed in browser. The Page-Title-Text that I want to choose as Title is located on my HTML page like <h4 class="fn"> Title of my Page </h4>. I got smth like this:

<?php
    $doc= DOMDocument::loadHTMLFile('index.html');
    $doc= new DOMDocument();
    $titelelem=$doc->getElementsByTagName('title')->item(0);
    $realtitleelem=$doc->getElementsByTagName('h4')->item(0);
    $realtitle=$realtitelelem->innerHTML;
    $titelelem->innerHTML=$realtitle;

    echo $doc->saveXML();
    echo $doc->saveHTML();
?>

No clue if smith is right here. Im not even sure how I load my html as new DOM.




Is there a hosted commenting service that can be integrated with an existing user system?

I'm looking for a hosted web service like Disqus that allows me to use an existing user system rather then having my users sign up again on an external site. I've looked around at commenting systems and the systems I've found all require an account for their platform.

I already have users on my website and I don't want them to sign up for another account to be able to comment. Disqus does have something they call "Single Sign-On" (https://help.disqus.com/en/articles/1717139-getting-started-with-single-sign-on) which sounds just like what I need. The problem is that Single Sign-On is only available for Business level subscription, which sounds like something for huge websites. They even state that it's for sites with over 150 000 daily page views.




Domain change: redirect 301 with htaccess does not work

I transferred my website from olddomain.de to newdomain.de and wanted to redirect every page of the old website to the new website (e.g. olddomain.de/contact -> newdomain.de/contact). When I enter the main page of the old website in the browser, I am getting redirected correctly but all other pages are not redirected.

I tried a lot of different redirect options and currently this one is implemented (the first IfModule already existed):

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on 
RewriteRule ^(.*)$ http://www.newdomain.de/$1 [R=301,L]
</IfModule>

# END WordPress

Does anyone know how to correct the htaccess file, so that all pages of the website are being redirected?




Is it possible to add Several bgcolor to one HTML page,Not background-color

In this page used 2 color as bgcolor




Why my scrollbar is at different position in scroll track

I'm using Vue to write a page, and customized my own scrollbar style, but at the same time occurs an odd problem.

Two scrollbars are at different position between two instance with same same comonent. One is at center, and the other is align to right.(I hope both at center.) How should I do?

center one right one

&::-webkit-scrollbar {
    width: 7px;
}

/* Track */
&::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Handle */
&::-webkit-scrollbar-thumb {
    background: #2ecb9e;
    border: 0.5px solid transparent;
    border-radius: 9px;
    background-clip: content-box;
}

/* Handle on hover */
&::-webkit-scrollbar-thumb:hover {
    background: #555;
}



How to get schema.org rating stars to my website

How do I generate SEO-for Rating my website show on Google search?




lundi 28 octobre 2019

How to validate a drop down list for a web form on Microsoft Visual Studio?

Link to rubric and code. This is for chapter 9 as I am trying to provide as much details as possible:

https://1drv.ms/u/s!AnJ4ilz1MKZlga4rg7cPsTPereF_8g?e=3acLyL

' Hi, I'm trying to create a web form using Microsoft Visual Studio. Under the comment, "Ensure a Taco Selection is Selected," what is the proper code to validate that a drop-down list has been selected? I have not yet begun validating that a check box has been selected. Would they use the same method of code? If not, how can I validate that a check box has been selected?

' I have tried to use the standard If-Then or If-Else statements but I keep receiving error messages.

' I apologize for mixing my question with the code, as I am not sure how to keep them separate

' Project: Street Tacos Order Form ' Author: Richard Lew ' Date: November 3, 2019 ' Purpose: The web application allows a customer to fill out a street taco order form.

Public Class About Inherits Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

End Sub

Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
    ' The btnSubmit click event will calculate the cost of the street tacos
    ' based on the type of tacos selected.

    ' Declare and initialize variables
    Dim decChickenCost As Decimal = 8.99D
    Dim decPorkCost As Decimal = 9.99D
    Dim decFishCost As Decimal = 12.99D
    Dim decBeefCost As Decimal = 13.99D
    Dim decExtraCost As Decimal = 0.99
    Dim strName As String
    Dim strAddress As String
    Dim strPhone As String
    Dim decOrderCost As Decimal = 0D
    Dim strMessage As String

    ' Trim additional spaces that are entered by the user
    strName = txtName.Text.Trim
    strAddress = txtAddress.Text.Trim
    strPhone = txtPhone.Text.Trim

    ' Clear the Order Message
    lblOrder.Text = ""

    ' Ensure a Taco Selection is Selected
    If (ddlTacoType.SelectedIndex == 0) Then
        {            {
        lblTacoTypeError.Visible = True
        }
    End If
End Sub

End Class

' The code should prompt the user to select a taco from the drop-down menu and to select at least one check box.




UX alternative in web app(react) for iOS swipe list

I'm making webapp with React based on iOS-app. What would be the best practise to do replace iOS swipe list actions, check image?

Or is there some good library to achieve that in React? (I didn't find any).

I need 3 actions for every list item, just like in the image.




Download a file from my domain with a direct link to the file from other sites

I want my site viewer to download a file that is on another site from my site. So that it doesn't show where to download the file. When the user downloads the file it feels like it is downloading directly from my host.

For example a file

otherssite.com/file.exe

viewer downloading mydomain.com/file.exe

enter image description here




MSBuild /p:AdditionalLibPaths or /p:ReferencePath not working as expected

In a .net application, I have a "WebSite" which has a reference to a dll defined in a refresh file. log4net.dll.refresh

When compiled with MSBuild, I would like to overwrite that project level setting with a command line for all available dlls in the given source folder.

Below is what i tried and couldn't fig out a way to do it with MSBuild

This worked for a c# console and class library applications but not for a website.

msbuild C:\Testing\TestMSBuild\TestMSBuild.sln /p:ReferencePath="C:\Testing\SharedLib\Stable\"

Using ReferencePath

Using AdditionalLibPaths Please help!!!




Firebase REST API login verification format error?

I am using Firebase Email authentication REST API to login to my app.

I want to know if the email is verified or not.

I referred https://firebase.google.com/docs/reference/rest/auth#section-confirm-email-verification

I got the rest URL https://identitytoolkit.googleapis.com/v1/accounts:update?key=[API_KEY]

the given URL also take a payload as oobCode , the output of post request should be a JSON object with a field emailVerified.

now my main goal is to know emailVerified boolean field, the given REST URL does not take any other information like whose email to check if it is verified or what is his access_token, I don't want to provide addition VERIFICATION_CODE as I sent a verification link, not the code.

Is there a very to know if the given URL is verified or not with REST API??

thank you.




Medusa without username

I have problem with Medusa software i use that command

medusa -h 192.168.0.1 -u admin -P passwd.txt -M http 

but it doesn't work. I checked and my ruter hasn't username, I use only password to log in. How to manage with that ?




Can't Load a .Net Core 3.0 Web App Running From CLI

Issue:

I have a .Net Core 3.0 app that I'm unable to load in a browser ONLY when running it using the CLI, like so:

$ dotnet new webapp
$ dotnet watch run
watch : Started
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using '/Users/<user>/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/<user>/Sandbox/coreapp3test

So everything looks good at this point, except when opening the URL in a browser I receive:

This site cannot be reached

localhost unexpectedly closed the connection.

Notes:

  • I can run the app in VS Code, so the runtime must be installed correctly
  • .NET Core 2.2 apps work fine with the CLI - I can run them from the CLI without issue. So it appears isolated to 3.0
  • I've also tried the following, without success:
    • Removing bin/ and obj/ and restoring / building again
    • Re-installing the SDK - same result
    • Disabling firewall (in case that was blocking the connection)
    • Generating multiple web project types (e.g. angular, mvc, etc.) to see if it was related to the template

System Info:

$ dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100
 Commit:    04339c3a26

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.0.100/

Host (useful for support):
  Version: 3.0.0
  Commit:  7d57652f33

.NET Core SDKs installed:
  2.1.300 [/usr/local/share/dotnet/sdk]
  2.1.402 [/usr/local/share/dotnet/sdk]
  2.1.505 [/usr/local/share/dotnet/sdk]
  3.0.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download