mardi 31 août 2021

Why isnt my CSS grid responding to my html?

I am attempting to use CSS grid (orderForm.css below) however the css styling is not responding to the html that i have written. I have found a lot of times I am not calling the element correctly due to nesting of divs. I was hoping you all could look at my code and tell me what is going on. Some pages it works in visual studios and some pages do not work. orderForm.html

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Order Form</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="/CSS/orderForm.css">
    </head>
    <body>
    <div class="grid-container">
   
      <nav class="navigation" id="original">
        <ul>
            <li><a href="/index.html" target="_blank">Home</a> </li>
            <li><a href="aboutUs.html" target="_blank">About Us</a></li>  
            <li><a href="/order.html" target="_blank">Order</a></li>    
            <li><a href="/orderForm.html" target="_blank">Order form</a></li>    
            <li><a href="/gallery.html" target="_blank">Gallery</a></li>
        </ul>
        </nav> 
      <h1 class="name" id="order-form"> Order Form</h1>
      <div class="blackLogo"> 
        <img src="/images/hoodHealerBlack.jpg" alt="Black Hood Healer Logo" width="200" height="80" class="logo" id="Black"></div> 
  
       <div class="pinkLogo"> 
        <img src="/images/hoodHealerPink.jpg" alt="Pink Hood Healer Logo" width="200" height="80" class="logo" id="Pink" ></div>
           
     <div class="container" id="partOne">
      <div class="container" id="name">
        <h2>Name</h2>
        <label for="Fname">First Name:</label>
        <input type="text" id="Fname" name="first-name">

        <label for="MInitial">Middle Initial:</label>
        <input type="text" id="MInitial" name="middle-initial">

        <label for="Lname">Last Name:</label>
       <input type="text" id="Lname" name="last-name">
      </div>

      <div class="container" id="billing-address">
      <h2 class="heading" id="billingAddress">Billing Address</h2>
      <label for="Street-address">Street Address:</label>
        <input type="text" id="Street-address" name="StreetAdress">
        <label for="apartment-PO">Apt # or PO Box:</label>
        <input type="number" id="apartment-PO" name="apartmentPOBox">
        <!--City, state ; zip code- number; apt number or po box input - number-->
      <br>
        <label for="city">City:</label>
        <input type="text" id="city" name="city">


          <form>
           <fieldset>
             <label for="state">State</label>
                <select id="state" name="state"><option value="---">---</option><option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option><option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option><option value="District of Columbia">District of Columbia</option><option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Guam">Guam</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option><option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option><option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option><option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option><option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option><option value="Northern Marianas Islands">Northern Marianas Islands</option><option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Puerto Rico">Puerto Rico</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option><option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Virgin Islands">Virgin Islands</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option></select>
             </fieldset>
          </form> 
        
          <label for="zip-code">Zip Code:</label>
          <input type="number" id="zip-code" name="zipcode">

          <input type="checkbox" id="mailing-address" name="mailingaddress" value="Mailing address">
          <label for="mailing-address"> Mailing address is the same as billing address.</label><br>
       
          <div class="container" id="mailing_address">
        <h2 class="heading" id="mailingAddress">Mailing Address</h2>

  
        <label for="Street_address">Street Address:</label>
        <input type="text" id="Street_address" name="StreetAdress">
      
  
          <label for="apartment_PO">Apartment number or PO Box:</label>
          <input type="number" id="apartment_PO" name="apartmentPOBox">
          <!--City, state ; zip code- number; apt number or po box input - number-->
          <label for="zip_code">Zip Code:</label>
          <input type="number" id="zip_code" name="zipcode">
  
  
          <label for="City">City:</label>
          <input type="text" id="City" name="city">
  
  
         
  
          <form>
            <fieldset>
               <label for="State">State</label>
                  <select id="State" name="state"><option value="---">---</option><option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option><option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option><option value="District of Columbia">District of Columbia</option><option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Guam">Guam</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option><option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option><option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option><option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option><option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option><option value="Northern Marianas Islands">Northern Marianas Islands</option><option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Puerto Rico">Puerto Rico</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option><option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Virgin Islands">Virgin Islands</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option></select>
               </fieldset>
            </form>
          
          
  </div>
</div>

     </div>
<div class="containter" id="partTwo">
  <div class="container" id="product-choice">
                <h2 class="heading" id="product-Choice">Choose your product:</h2>
                <form>
                  <input type="radio" id="Hat" name="Product" value="HAT">
                  <label for="Hat">Hat</label><br>

                  <input type="radio" id="Shirt" name="Product" value="SHIRT">
                  <label for="Shirt">Shirt</label><br>

                  <input type="radio" id="Hoodie" name="Product" value="HOODIE">
                  <label for="Hoodie">Hoodie</label><br>

                  <input type="radio" id="Pants" name="Product" value="PANTS">
                  <label for="Pants">Pants</label><br>

                </form>
  </div>
 <div class="container" id="size-choice">
                         <h2 class="heading" id="size-Choice">Choose your size:</h2>
                        <form>
                          <input type="radio" id="Small" name="Size" value="SMALL">
                          <label for="Small">Small</label><br>

                          <input type="radio" id="Medium" name="Size" value="MEDIUM">
                          <label for="Medium">Medium</label><br>

                          <input type="radio" id="Large" name="Size" value="LARGE">
                          <label for="Large">Large</label><br>

                          <input type="radio" id="X-Large" name="Size" value="X-LARGE">
                          <label for="X-Large">X-Large</label><br>

                          <input type="radio" id="XX-Large" name="Size" value="XX-LARGE">
                          <label for="XX-Large">XX-Large</label><br>

                          <input type="radio" id="XXX-Large" name="Size" value="XXX-LARGE">
                          <label for="XXX-Large">XXX-Large</label><br>

                          <input type="radio" id="XXXX-Large" name="Size" value="XXXX-LARGE">
                          <label for="XXXX-Large">XXXX-Large</label><br>

                          <input type="radio" id="XXXXX-Large" name="Size" value="XXXXX-LARGE">
                          <label for="XXXXX-Large">X-Large</label><br>
                        </form>
 </div>

  <div class="container" id="logo-color">
                        <h2 class=" heading" id="logo-Color">Choose your style of logo:</h2>

                <form>
                  <input type="radio" id="pink" name="logoColor" value="PINK">
                  <label for="pink">Pink</label><br>

                  <input type="radio" id="black" name="logoColor" value="BLACK">
                  <label for="black">Black</label><br>
                  <!-- <input type="radio" id="Custom" name="logoColor" value="CUSTOM">
                  <label for="Custom">Custom</label> -->
                </form> 
    /div>
                      <input type="submit" value="Submit"> </div>
</div>  
       <footer> <p>copyright Kajah's Krafts</p>
    <a href="/contact.html" target="_blank">Contact Us</a>
    </footer>         
  </body>

</html>

orderForm.css

 /* Skeleton of pages below */
    .grid-container {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
    nav#original.navigation, h1 {
        grid-column: 4 / 10;
        grid-row: 1 / 2;
            text-align: center;
        }
    /* Fix the images, not correctly displaying  */
    div.blackLogo {
                grid-column: 1 / 4;
                grid-row: 1 / 2; 
                image-resolution: from-image 300dpi;
               }
    div.pinkLogo {
               grid-column: 10 / 13;
               grid-row: 1 / 2;
            }
    
    ul li {
                display: inline;
                list-style: none;
            }
            /* Footer not responding to grid dimensons */
    footer {
        grid-column: 1 / 13;
        grid-row: 4 / 5; 
        text-align: center;
    }
    h1{
        padding: 10px;
    }
    
    /* div#all.container {
        grid-column: 1/13 ;
        grid-row: 2/3;
    } */
    
    /* div#name.container, div#billing-address.container,div#mailing-address.container {
        display: inline;
        grid-column: 1 / 7;
        grid-row: 2 / 4; 
    }*/
    body > div.grid-container > div#partOne.container {
        grid-column: 1 / 7;
        grid-row: 2 / 4;
    }
    /* columns not running span of grid-column dimensions */
    div#partTwo.container {
        grid-column: 7 / 13;
        grid-row: 2 / 4;
    } 
    
    /* div#product-choice.container >h2#product-Choice.heading {
        text-align: center;
    } */
    /* div#partTwo.container > div#product-choice.container > h2#product-choice.heading {
    grid-column: 7 / 13;
    grid-row:  2 / 4;
    } */
    
 



social features in organizations

I am learning to program and have an idea to integrate a text/video and/or group type set up in websites I would create for religious organizations to have alternatives to FB. Has anyone done this and can help me? The site part is fine. It’s the social forum I need. I also want other affiliated churches to be able to chat in real time with each other. Thank You




How to create a layout responsive in flutter?

I am new to Flutter and I am having some problems when it comes to making a responsive web app. The layout I'm trying to make is similar to the one shown below,

the image is a prototype

but when I resize the screens, everything gets distorted. I have tried using the responsive widgets but there is no case.

PD: Sorry for my bad english !

class _ScreenState extends State<Screen> {
  @override
  Widget build(BuildContext context) {
    final childrenHorizontal = [
      Expanded(flex: 2150, child: RectanguloIzquierdaHorizontal()),
      Expanded(flex: 1850, child: RectanguloDerechaHorizontal()),
    ];

    final childrenVertical = [
      Expanded(child: RectanguloIzquierdaVertical()),
      Expanded(child: RectanguloDerechaVertical())
    ];

    final _screenSize = MediaQuery.of(context).size;
    return Scaffold(
      appBar: AppBar(
        actions: [
          IconButton(
              onPressed: null,
              icon: Icon(
                Icons.menu_rounded,
                color: Colors.white,
                size: 35,
              ),
              padding: EdgeInsets.only(right: 30)),
        ],
        // leading: Icon(Icons.menu, color: Colors.white,),#
        centerTitle: true,
        title: Text(
          'Title',
          style: TextStyle(
              fontSize: 16),
        ),
        backgroundColor: Colors.grey,
        elevation: 1,
      ),
      body: LayoutBuilder(
        builder: (BuildContext context, BoxConstraints constrains) {
          return (constrains.maxWidth < 600)
              ? Column(
                  children: childrenVertical,
                )
              : SingleChildScrollView(
                  child: Row(
                    children: childrenHorizontal,
                  ),
                );
        },
      ),
      backgroundColor: Color.cyan,
      bottomNavigationBar: ScreenFooter(screenSize: _screenSize),
    );
  }
}

class RectanguloIzquierdaHorizontal extends StatefulWidget {
  @override
  _RectanguloIzquierdaHorizontalState createState() =>
      _RectanguloIzquierdaHorizontalState();
}

class _RectanguloIzquierdaHorizontalState
    extends State<RectanguloIzquierdaHorizontal> {
  @override
  Widget build(BuildContext context) {
    final _screenSize = MediaQuery.of(context).size;
    final padding = _screenSize.width * .1;
    return Padding(
      padding: EdgeInsets.only(left: padding),
      child: Container(
        width: _screenSize.width * 1.2,
        height: 800,
        decoration: BoxDecoration(
          color: Colors.orange,
        ),
        child: Column(
          children: [
            Padding(padding: EdgeInsets.only(top: _screenSize.height * .125)),
            Container(
              margin: EdgeInsets.only(
                  left: _screenSize.width * .03,
                  right: _screenSize.width * .04),
              child: AutoSizeText(
                "TEXT TEXT TEXT"                ,
                style: TextStyle(
                    fontSize: 16,                  
                    color: Colors.white),
                maxFontSize: 16,
                minFontSize: 12,
                maxLines: 6,
              ),
            ),
            Container(
              margin: EdgeInsets.only(
                  left: _screenSize.width * .02,
                  right: _screenSize.width * .13),
              child: AutoSizeText(
                "TEXT TEX TEX",
                style: TextStyle(
                    fontSize: 100,                   
                  ),
                maxFontSize: 100,
                minFontSize: 30,
                maxLines: 1,
              ),
            ),
            Container(
              margin: EdgeInsets.only(top: 50, left: 45, right: 50),
              height: _screenSize.height * .50,
              decoration: BoxDecoration(
                color: Colors.purple,
                borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(20),
                    topRight: Radius.circular(20)),
                boxShadow: [
                  BoxShadow(
                    color: Colors.black26,
                    blurRadius: 10.0,
                    spreadRadius: 2.0,
                    offset: Offset(2.0, 10),
                  )
                ],
              ),
              child: Container(
                decoration: BoxDecoration(
                  color: Colors.green,
                  borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(20),
                      topRight: Radius.circular(20)),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.black26,
                      blurRadius: 10.0,
                      spreadRadius: 2.0,
                      offset: Offset(2.0, 10),
                    )
                  ],
                ),
                margin: EdgeInsets.only(top: 7, left: 7, right: 7),
                height: _screenSize.width * .50,
                child: Container(
                  decoration: BoxDecoration(
                    color: Colors.blue,
                    borderRadius: BorderRadius.only(
                        topLeft: Radius.circular(20),
                        topRight: Radius.circular(20)),
                    boxShadow: [
                      BoxShadow(
                        color: Colors.black26,
                        blurRadius: 10.0,
                        spreadRadius: 2.0,
                        offset: Offset(2.0, 10),
                      )
                    ],
                  ),
                  margin: EdgeInsets.only(top: 7, left: 7, right: 7),
                  height: _screenSize.height * .50,
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}

class RectanguloDerechaHorizontal extends StatefulWidget {
  @override
  _RectanguloDerechaHorizontalState createState() =>
      _RectanguloDerechaHorizontalState();
}

class _RectanguloDerechaHorizontalState
    extends State<RectanguloDerechaHorizontal> {
  @override
  Widget build(BuildContext context) {
    final _screenSize = MediaQuery.of(context).size;
    final padding = _screenSize.width * .1;
    return Padding(
      padding: EdgeInsets.only(right: padding),
      child: Container(
          width: double.infinity,
          height: 800,
          decoration: BoxDecoration(color: Colors.white),
          child: Column(children: [
            Padding(padding: EdgeInsets.only(top: _screenSize.height * .06)),
            Expanded(
              flex: 100,
              child: Container(
                //color: Colors.red,
                child: Row(
                  children: [
                    Padding(
                        padding: EdgeInsets.only(top: _screenSize.height * .2)),
                    Container(
                        margin: EdgeInsets.only(
                            top: _screenSize.height * .01,
                            left: _screenSize.width * .03),
                        child: Image(
                          image: AssetImage(
                              'image'),
                        )),
                  ],
                ),
              ),
            ),
            Padding(padding: EdgeInsets.only(top: _screenSize.height * .05)),
            Expanded(
              flex: 50,
              child: Container(
                margin: EdgeInsets.only(right: _screenSize.width * .050),
                child: AutoSizeText(
                  'TEXT',
                  style: TextStyle(
                      fontSize: 80,                   
                    
                      height: 0.85),
                  maxFontSize: 80,
                  minFontSize: 30,
                  maxLines: 1,
                ),
              ),
            ),
            Expanded(
              flex: 50,
              child: Container(
                margin: EdgeInsets.only(right: _screenSize.width * 0.010),
                child: AutoSizeText(
                  'TEXT',
                  style: TextStyle(
                      fontSize: 80,                     
                      color: Colors.red,
                      height: 0.85),
                  maxFontSize: 80,
                  minFontSize: 30,
                  maxLines: 1,
                ),
              ),
            ),
            Expanded(
              flex: 50,
              child: Container(
                margin: EdgeInsets.only(right: _screenSize.width * 0.165),
                child: AutoSizeText(
                  'TEXT',
                  style: TextStyle(
                      fontSize: 80, 
                      height: 0.85),
                  maxFontSize: 80,
                  minFontSize: 30,
                  maxLines: 1,
                ),
              ),
            ),
            Expanded(
              flex: 300,
              child: Container(
                child: Row(
                  children: [
                    Container(
                      margin: EdgeInsets.only(
                          bottom: 265, left: _screenSize.width * .040),
                      child: Text(
                        'TEXT',
                        style: TextStyle(
                            fontSize: 60,                          
                         
                            height: 0.85),
                      ),
                    ),
                    Expanded(
                      child: Container(
                        child: Column(
                          children: [
                            Container(
                                child: Image(
                              image: AssetImage(
                                  'image'),
                              height: 288,
                              width: 288,
                            )),
                            Container(
                              child: TextButton(
                                onPressed: () {
                                  Navigator.push(
                                    context,
                                    MaterialPageRoute(
                                        builder: (context) => SelectAge()),
                                  );
                                },
                                child: Text(
                                  'BUTTON',
                                  style: TextStyle(                                        
                                     
                                      fontSize: 20,
                                      decoration: TextDecoration.underline,
                                    
                                ),
                              ),
                            )
                          ],
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ])),
    );
  }
}



How a simple php web application works [closed]

i'm new into programming and i have a few questions: recently i download a project that use php, xampp, mysql to make a web application. Application is based on html forms, with form that have method post and action: a php file. after the user complete the form and submit, data go to php file where for example insert into database like if(isset($_POST['button'])) initialise variable and insert into database . My questions are: what architecture does that project have? i want to understand how that application work, all the architecture, what model is used, and if you can show me a diagram to understand how it works, how a simple php web application works based on files from the sistem and html forms and php code.

Thank you and sorry for my bad english!




How to Login to website using raw data from code [closed]

Website with url name ending with .net like Microsoft named . Net is it to prevent showing up in Unix directory listing.




Black box appears at the bottom of website

I have a simple website.

When I test it offline by hosting it on localhost everything works fine.

However when I transfer the webpage to my hosting server and access it from the internet a black box appears at the bottom of the page as i scroll down. This does not happen when testing offline only online.

Stanger still if i rotate my screen to landscape and then back to portrait then the problem seems to go away , however if i reload the page it reappears.

Ps. I am accessing the website online using a mobile phone.

This is what the problem looks like

This is what problem looks like

This is how it looks after i rotate my screen to landscape and then portrait, this is the desired look


    <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    
    <title>Impressions</title>

    <link href="css/mobile.css" rel="stylesheet" />
    
</head>
<body>

    <div>
        <ul class="header">
            <li class="streamicon"> <a href="Index.html#stream-link"><img src="sys_media/radio_tower_black.png" /></a></li>
            <li class="headerlogo"> <a href="Index.html"><img src="sys_media/MenuBar_Logo.png"></a></li>
        </ul>
    </div>

    <input type="checkbox" class="openSidebarMenu" id="openSidebarMenu">
    <label for="openSidebarMenu" class="sidebarIconToggle">
        <div class="spinner diagonal part-1"></div>
        <div class="spinner horizontal"></div>
        <div class="spinner diagonal part-2"></div>
    </label>

    <div class="footer">

        <div id="end">
            <img src="../sys_media/main_logo.png" /><br />
            Copyright &copy;. 2021<br />
            <div></div>
            <a id="credit" href="www.elitewebsites.co.za">This website was designed by <span>www.elitewebsites.co.za</span></a>
        </div>
    </div>
</body>
</html>

```````````````````````````````

    @import url('https://fonts.googleapis.com/css?family=Tw+Cen+MT+Condensed');

html, body {
    overflow-x: hidden;
    height: 100%;
}

body {
    background: #fff;
    padding: 0;
    margin: 0;
    font-family: 'Tw Cen MT Condensed', sans-serif;
    overflow-y: scroll;
}

.header {
    display: block;
    margin: 0 auto;
    list-style-type:none;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    background: whitesmoke;
    position: fixed;
    height: 135px !important;
    overflow: hidden;
    z-index: 10;
    border-bottom-style: solid;
    border-bottom-width: 2px;
}


.streamicon img {
    width: 100px;
    height: 100px;
    left: 24px;
    position: absolute;
    top: 17px;
}

.headerlogo img {
    width: 556px;
    height: 92px;
    left: 29%;
    position: absolute;
    top: 26px;
}

input[type="checkbox"]:checked ~ .footer {
    transform: translateX(-100%);
}

input[type=checkbox] {
    transition: all 0.3s;
    box-sizing: border-box;
    display: none;
    background-color: black;
}

.sidebarIconToggle {
    transition: all 0.3s;
    box-sizing: border-box;
    cursor: pointer;
    position: absolute;
    z-index: 99;
    height: 100%;
    width: 100%;
    top: 44px;
    left: 93.2%;
    height: 22px;
    width: 65px;
}

.spinner {
    transition: all 0.3s;
    box-sizing: border-box;
    position: absolute;
    height: 5px;
    width: 100%;
    background-color: black;
}

.horizontal {
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    float: left;
    margin-top: 18px;
    background-color: black;
}

.diagonal.part-1 {
    position: relative;
    transition: all 0.3s;
    box-sizing: border-box;
    float: left;
    background-color: black;
}

.diagonal.part-2 {
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    float: left;
    margin-top: 18px;
    background-color: black;
}


input[type=checkbox]:checked ~ .sidebarIconToggle > .horizontal {
    transition: all 0.3s;
    box-sizing: border-box;
    opacity: 0;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-1 {
    transition: all 0.3s;
    box-sizing: border-box;
    transform: rotate(135deg);
    margin-top: 8px;
    top: 17px;
    margin-left: 1px;
}

input[type=checkbox]:checked ~ .sidebarIconToggle > .diagonal.part-2 {
    transition: all 0.3s;
    box-sizing: border-box;
    transform: rotate(-135deg);
    margin-top: -12px;
}


.footer {
    position: relative;
    font-size: 35px;
    font-weight: bold;
    margin-top: 60px;
    margin-left:4vw;
    text-align: center;
    transition: transform 250ms ease-in-out;
}


    .footer a {
        color: #0f98fe;
        font-size: 35px;
        text-decoration: none;
    }



    .footer div{
        height:21px;
    }

    .footer img {
        width: 50%;
        margin-left: 2.5%;
        padding-bottom: 32px;
        position: static;
    }

    .footer #end {
        margin-top: 400px;
        height: 590px;
        position: absolute;
        border-top: 0px solid;
        font-size:35px;
    }

    .footer #credit {
        display: inline;
        color: black;
        text-decoration:none;
    }

    .footer span {
        color: #0f98fe;
    }

    .footer #end div{
        height:21px;
    }
}

`````````````````````````````



Minifying JS File / Website Preloader Question

Can someone please assist me with minifying this JS file? Every time I minify it or combine it with any other JS files it stops working on the website it's being used on. I am not extremely well versed in JS and have a programmer that usually handles this kind of thing, but he is not helping. The JS file is below, any help is greatly appreciated.

website I need it to run on: https://digitalupgrade.com

Also if you're feeling extra generous; I need some help figuring out why the preloader sucks at that link. You can see the website loading in the background and then the preloader just flashes for a moment. Thanks!!!

(function() {
  "use strict";

  /**
   * Easy selector helper function
   */
  const select = (el, all = false) => {
    el = el.trim()
    if (all) {
      return [...document.querySelectorAll(el)]
    } else {
      return document.querySelector(el)
    }
  }

  /**
   * Easy event listener function
   */
  const on = (type, el, listener, all = false) => {
    let selectEl = select(el, all)
    if (selectEl) {
      if (all) {
        selectEl.forEach(e => e.addEventListener(type, listener))
      } else {
        selectEl.addEventListener(type, listener)
      }
    }
  }

  /**
   * Easy on scroll event listener 
   */
  const onscroll = (el, listener) => {
    el.addEventListener('scroll', listener)
  }

  /**
   * Navbar links active state on scroll
   */
  let navbarlinks = select('#navbar .scrollto', true)
  const navbarlinksActive = () => {
    let position = window.scrollY + 200
    navbarlinks.forEach(navbarlink => {
      if (!navbarlink.hash) return
      let section = select(navbarlink.hash)
      if (!section) return
      if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {
        navbarlink.classList.add('active')
      } else {
        navbarlink.classList.remove('active')
      }
    })
  }
  window.addEventListener('load', navbarlinksActive)
  onscroll(document, navbarlinksActive)

  /**
   * Scrolls to an element with header offset
   */
  const scrollto = (el) => {
    let header = select('#header')
    let offset = header.offsetHeight

    let elementPos = select(el).offsetTop
    window.scrollTo({
      top: elementPos - offset,
      behavior: 'smooth'
    })
  }

  /**
   * Toggle .header-scrolled class to #header when page is scrolled
   */
  let selectHeader = select('#header')
  let selectTopbar = select('#topbar')
  if (selectHeader) {
    const headerScrolled = () => {
      if (window.scrollY > 100) {
        selectHeader.classList.add('header-scrolled')
        if (selectTopbar) {
          selectTopbar.classList.add('topbar-scrolled')
        }
      } else {
        selectHeader.classList.remove('header-scrolled')
        if (selectTopbar) {
          selectTopbar.classList.remove('topbar-scrolled')
        }
      }
    }
    window.addEventListener('load', headerScrolled)
    onscroll(document, headerScrolled)
  }

  /**
   * Back to top button
   */
  let backtotop = select('.back-to-top')
  if (backtotop) {
    const toggleBacktotop = () => {
      if (window.scrollY > 100) {
        backtotop.classList.add('active')
      } else {
        backtotop.classList.remove('active')
      }
    }
    window.addEventListener('load', toggleBacktotop)
    onscroll(document, toggleBacktotop)
  }

  /**
   * Mobile nav toggle
   */
  on('click', '.mobile-nav-toggle', function(e) {
    select('#navbar').classList.toggle('navbar-mobile')
    this.classList.toggle('bi-list')
    this.classList.toggle('bi-x')
  })

  /**
   * Mobile nav dropdowns activate
   */
  on('click', '.navbar .dropdown  i.bi', function(e) {
    if (select('#navbar').classList.contains('navbar-mobile')) {
      //e.preventDefault()
      this.nextElementSibling.classList.toggle('dropdown-active')
      if(this.nextElementSibling.classList.contains('dropdown-active')){
        this.classList.toggle('bi-chevron-down')
        this.classList.toggle('bi-chevron-up')
      }else{
        this.classList.toggle('bi-chevron-up')
        this.classList.toggle('bi-chevron-down')
      }
    }
  }, true)

  /**
   * Scrool with ofset on links with a class name .scrollto
   */
  on('click', '.scrollto', function(e) {
    if (select(this.hash)) {
      e.preventDefault()

      let navbar = select('#navbar')
      if (navbar.classList.contains('navbar-mobile')) {
        navbar.classList.remove('navbar-mobile')
        let navbarToggle = select('.mobile-nav-toggle')
        navbarToggle.classList.toggle('bi-list')
        navbarToggle.classList.toggle('bi-x')
      }
      scrollto(this.hash)
    }
  }, true)

  /**
   * Scroll with ofset on page load with hash links in the url
   */
  window.addEventListener('load', () => {
    if (window.location.hash) {
      if (select(window.location.hash)) {
        scrollto(window.location.hash)
      }
    }
  });
    /**
   * Animation on scroll
   */
  window.addEventListener('load', () => {
    AOS.init({
      duration: 1000,
      easing: 'ease-in-out',
      once: false,
      mirror: false
    })
  });
  /**
   * Preloader
   */
  let preloader = select('#preloader');
  if (preloader) {
    window.addEventListener('load', () => {
      preloader.remove()
    });
  }

})()

Edit: If you need the rest of the site's JS, here is the big minified JS file that I am needing to append the above script to. https://digitalupgrade.com/templates/lithvam/js/dup-full.js




How do I share my website to another user without any coding? [closed]

I decided to make an html website from scratch using html,css and a little java, but I can't seem to figure out how to share the website to another user (the admin) to be able to edit the website without coding. I'm trying to use less money as possible to do this....




Is there any difference between clipboardData.getData('text/plain') and general plain text?

In pure javascript file we have:

let plainText = `a
b`
// anb
console.log(plainText.replace(/\n/, 'n'))
// nb
console.log(plainText.replace(/(.+)\n/, 'n'))

Then paste the plain text

a
b

into the following div:

div{
  border: 1px solid #000;
}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div contenteditable="true"></div>
    <script>
        const div = document.getElementsByTagName('div')[0]
        div.addEventListener('paste', (e) => {
            let plainText = e.clipboardData.getData('text/plain')
            // a
            // b
            console.log(plainText)
            // anb
            console.log(plainText.replace(/\n/, 'n'))
            // a
            // b
            console.log(plainText.replace(/(.+)\n/, 'n'))
        })
    </script>
</body>

</html>

Why does plainText.replace(/(.+)\n/, 'n') get different results in javascript and web page? (CRLF is used in the editor. The browser runs on win10.)

The problem occurs in the latest Chrome and Edge while Firefox works fine.




Favicon is Not Showing Up

I had Almost done Everything. But my Favicon is Still Not Showing Please Review My Code. I had Downloaded Favicons from Fivcon.io and Copied that downloaded folder in my Website Folder After extracting then Pasted the Given Code By Them. But it Still Doesn't show Favicon.

Here is My code

<!DOCTYPE html>
<html lang="en">

<head>
    
    <link rel="icon" href="favicon-32x32.png"  type="image/x-icon">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0">
        <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
        <title>
        Survey
    </title>
    
    
<link rel="stylesheet" type="text/css" href="css\css.css">
</head>

<body>
    <form id="form">
    <h1 class="heading">Covid Survey Form</h1>

    <!-- Create Form -->
    



upload file in the flutter web with web view or another programing

Hi I need to receive user information and a zip file to register in Web Flutter, but the file_picker and ... package does not support uploading files zip to Web flutter. I have to find a way to this position .... Can be uploaded to a server in a web view or new web window via a webpage NodJS or php or ... Send and report the post to Flutter page and let Flutter listen to what happened on that page ... and do something? How can I do this? And is there another way to upload the file from the web Flutter to the server?




HAProxy reqrep request manipulation

I'm aiming to achieve the following in HAProxy using reqrep; any advice/assistance on how to achieve that would be greatly appreciated :)

Overall, either through request manipulation (reqrep) or another method, I need to perform a rewrite matching the below:

from: subdomain.domain.com/subcategory1/subcategory2/image.jpg

to: subcategory1.domain.com/image.jpg**

Over complicating it, subcategory is not always the same but is always "p" followed by a two digit number, eg. /p1/ or /p21/

Thanks in advance :)




react xarrows not render properly when site load first time

When site load first lines are not properly connect to given elements

After reload page once lines are properly connect to given elements

this is my diagram.js component

import React from "react";
import Xarrow, { Xwrapper } from "react-xarrows";
import './Diagram.css';

class Diagram extends React.Component{
    constructor(props) {
            super(props);
            this.state = {
              lines:[
                    {       
                    start:"test3",
                    end:"test1" ,
                    color:'green',
                    path:'grid',
                    dashness:{ animation: 1 },
                    showHead:false
                    },
                    {       
                    start:"test3",
                    end:"test2" ,
                    color:'green',
                    path:'grid',
                    dashness:{ animation: 1 },
                    showHead:false
                    },
                    {       
                    start:"test3",
                    end:"test4" ,
                    color:'green',
                    path:'grid',
                    dashness:{ animation: 1 },
                    showHead:false        
                    },
                    {       
                    start:"test3",
                    end:"test5" ,
                    color:'green',
                    path:'grid',
                    dashness:{ animation: 1 },
                    showHead:false        
                    },
                    ]
            }
    }

    render(){
            return(
                    <Xwrapper>
                            <div className="bulma-col columns is-2 is-multiline is-mobile">

                                    <div className="column is-4">
                                    <img className="icon is-medium" src='' alt="test1" id="test1"/>
                                    <div>test1</div>
                                    </div> 
                                    
                                    <div className="column is-4"></div>

                                    <div className="column is-4">
                                            <img className="icon is-medium" src='' alt="test2" id="test2" />
                                            <div>test2</div>
                                    </div>
                                    <div className="column is-4"></div>

                            
                                    <div className="column is-4">
                                            <img className="icon is-medium" src='' alt="test3" id="test3" />
                                            <div>test3</div>
                                    </div>
                                    <div className="column is-4"></div>

                                    <div className="column is-4">
                                            <img className="icon is-medium" src='' alt="test4" id="test4" />
                                            <div>test4</div>
                                    </div>
                                    <div className="column is-4"></div>
                                    
                                    <div className="column is-4">
                                            <img className="icon is-medium" src='' alt="test5" id="test5" />
                                            <div>test5</div>
                                    </div>
                                    {this.state.lines.map((line,i)=>(<Xarrow key={i} {...line} />))}
                            </div>
                    </Xwrapper>
            )
        
    }
}
export default Diagram;

I tried to figure a way to fix this bug. I tried to create lines in state. I googled this but have no any solution.can someone help me to figure this out




Tracking QRCode

With my team, we're working on an event in many place of my city. The main thing is that we want to help them to build a route memory, so we decided to let them scan a QRCode that can update the place they went by saving they're unique accessible information (But I don't know what, I thought that the phone number would be simple but finally not) in our server. So from scanning the QRCode, we want to get this unique information of the person (Number, MAC Address, or anything unique) and the name of the place. Does someone have any idea about what kind of technic could we use? Like an API or what else to make it possible?

Thank you




filter by price-desc is wrong if you have variable products on woocommerce

the sorting of variable product at low to high on woocommerce website is working fine. but sorting price high to low is confused with products that are variable and takes not the basic price. is there a way to have the opposite of price ? i am using latest version of woocommerce and php 7.3




How can I pull data from website table using vba

I have a problem writing code that will pull data from a web page. The first part of the code works well, but the second part I can't write correctly to pulls the data from the table from the site. The problem is the "td" tags, I need the data contained in the "td" tags, all of them or some of them. I have tried in many ways but I have not succeeded. Can anyone help me with the code that will pull this data from the table?

This is the code I have:

Sub provera_TR_klijenta()

    'check in References: _
    Microsoft Internet Controls _
    Microsoft HTML Object Library
    
    Dim objIE As InternetExplorer 'special object variable representing the IE browser
    Dim aEle As HTMLLinkElement 'special object variable for an <a> (link) element
    
    Dim ieDoc As MSHTML.HTMLDocument
    Dim iframeDoc As MSHTML.HTMLDocument
    
    'initiating a new instance of Internet Explorer and asigning it to objIE
    Set objIE = New InternetExplorer
    
    'make IE browser visible (False would allow IE to run in the background)
    objIE.Visible = True
    objIE.Width = 1000
    objIE.Height = 800
    
    'navigate IE to this web page (a pretty neat search engine really)
    objIE.navigate "https://nbs.rs/en/drugi-nivo-navigacije/servisi/jedinstveni-registar-racuna/index.html"
    'wait here a few seconds while the browser is busy
    Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop
    
    Set ieDoc = objIE.document
    Set iframeDoc = ieDoc.frames(0).document
    
    iframeDoc.getElementsByName("matbr")(1).Value = "21122017"
    iframeDoc.getElementsByName("Submit")(0).Click
    
    Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop
    
    '*** I don't know what to do from here ***

End Sub

The html code is on this link: https://codebeautify.org/alleditor/cbf73981




maven web project with error org.apache.tomcat.util.bcel.classfile.ClassFormatException: It is not a Java .class file

I am using maven to build a web project, there are some class files in my project under WebContent/WEB-INF/Classes. The names are org.apache.axis2.transport.http.AxisAdminServlet, org.apache.axis2.webapp.AdminAgent and org.apache.axis2.webapp.AxisAdminServlet.They are all class files and can be decompiled. When I build the war package with the mvn package command, I get an error when I run it in tomcat:

31-Aug-2021 14:10:26.235 严重 [main] org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource Unable to process web resource [/WEB-INF/classes/org/apache/axis2/transport/http/AxisAdminServlet.class] for annotations
 org.apache.tomcat.util.bcel.classfile.ClassFormatException: It is not a Java .class file
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:200)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:78)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2082)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1981)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1975)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1975)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1975)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1975)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1975)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1146)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

And I took out the above class files from the webapp of tomcat, and found that it could not be decompiled. My maven configuration is as follows

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <warName>${project.artifactId}</warName>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>WebContent/axis2-web</directory>
                            <targetPath>axis2-web</targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>WebContent/WEB-INF</directory>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>true</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>

Did maven change the class files in building? How do I configure pom.xml to ensure that maven does not make changes to these class files?




Code for knowing that PDF was seen and printed

I am currently developing a report website that generate PDF documents and they are printable. And then, I need to know how many that documents was seen and printed.

What is the code for knowing how many the PDF documents was seen and printed? Please help me. Thank you.




lundi 30 août 2021

I want to preview HTML form data in pop window before submit. How to do that using JavaScript?

Following is my HTML Code having two buttons, Preview and Submit. I want to pop a window showing form preview when click on Preview and then submit the form when I click on Submit.

    <form action="">
    <div class="search-form">
        <div class="form-header">
            <h4>Post a New Job</h4>
        </div>

        <label for="job_title">Job Title</label>
        <input type="text" name="job_title" id="job_title" placeholder="Hiring for which position">


        <label for="company">Company Name</label>
        <input type="text" name="company" id="company" placeholder="Name of the hiring organization">


       
        <label for="experience-required">Total Experience Required</label>
        <div class="input-range">
            <input type="number" min="0" max="50" name="experience-required-min" id="experience-required-min"
                placeholder="Min in Years">
            <span>To</span>
            <input type="number" min="0" max="50" name="experience-required-max" id="experience-required-max"
                placeholder="Max in Years">
        </div>
        <label for="salary-range">Salary Range</label>
        <div class="input-range">
            <input type="number" min="0" max="50" name="salary-range-min" id="salary-range-min"
                placeholder="Min in Lpa">
            <span>To</span>
            <input type="number" min="0" max="50" name="salary-range-max" id="salary-range-max"
                placeholder="Min in Lpa">

        </div>
        
        </div>
        <label for="job-desciption">Job Description</label>
        <textarea name="job-desciption" class="input-range" placeholder="Enter Job Desciption"
            style="height: 100px"></textarea>
    </div>
    <br>
    <a href="" <button class="btn btn-lg btn-warning" type="submit" name="search">Post</button>
    </a>
    <a href="" <button class="btn btn-lg btn-warning" type="submit" name="search">Preview</button>
    </a>

</form>



Why does not the link have a file name even though when I enter it my browser starts to download a file? [closed]

This is the link from an online video downloader website: https://dnd21232.9xbud.com/down/YToyOntzOjY6ImhlYWRlciI7YToxOntpOjA7czoxMjQ6IlJlZmVyZXI6IGh0dHBzOi8vd3d3LnRva3lvbW90aW9uLm5ldC92aWRlby8yMDY5NTg2LyVFNSU4MCU4QiVFNiU5MiVBRS0lRTclOEElQUMlRTMlODIlQjMlRTMlODIlQjklRTclQkUlOEUlRTUlQjAlOTElRTUlQTUlQjMiO31zOjM6InVybCI7czo1NjoiaHR0cHM6Ly93d3cudG9reW9tb3Rpb24ubmV0L3ZzcmMvaGQvODA4Y2YzYTk5MjZmOWE1NWMxZTciO30,/a0d2936fbe62772739c5a22515651f98-1630393072?customName=%E3%80%90%E5%80%8B%E6%92%AE%E3%80%91%E7%8A%AC%E3%82%B3%E3%82%B9%E7%BE%8E%E5%B0%91%E5%A5%B3%20-%20TOKYO%20Motion_%20HD It of course works when I want to download an online video, the Chrome can get an Mp4 file from it, but when I copy the address from Chrome and then paste it into a download manager it does'n get the file, I just curious about it, how does this type of link work?




When opening file via Servlet, it returns files but has a issue about filename

My code here:

@GET
@Path("getFile")
public Response getFile(@QueryParam("accessKey") String accessKey) throws Exception {
    File file = new File(accessKey);

    //Getting filename
    String fileName = file.getName();

    // Response
    return Response.ok((Object) file).header("Content-Type", "application/vnd.ms-powerpoint")
            .header("Content-Disposition: inline;", " filename*=\"" + fileName + "\"")
            .header("Content-Lentgh", file.length())
            .build();
}

This code works well, but the title bar of opened file says "getFile.pptx". This is not actual filename , I think this is action name of this method or a part of URL I accessed. How can I fix this to get right file name? I don't wanna change this part, "Content-Disposition: inline;" because I want to open file directly, not attaching.




How to get data data from site periodically and automated?

Problem: I need to take a ferryboat every weekday to get to my job, so I check the ferryboat's website to check the estimated delay time or if the line is too big.

The website only shows the current estimated time and refreshes it every 15 min I guess. So there is a number like: Delay = 20 min.

What I want to do: I want to get that number from the page (at every 1 hour) and save it automatically into a database somewhere so I can generate a chart, showing the patterns of the delay, and so on.

I have an intermediate javascript level. Thanks.




OkHttp Post MediaType Parse

I am trying to send a single line of text of a employee id in the body of a OkHttp POST request, simulating a request that I see using browser inspection.

The request is a mix of URL params and a single string of employee ID in the body of the post, i.e. ABC123

Currently after login and sending the request the server response is 500.

        Request quickFind = new Request.Builder()
            .url(quickFIndUrl)
            .addHeader("csrf_tok", csrfToken)
            .addHeader("x-rest-api", "true")
            .addHeader("x-requested-with", "true")
            .addHeader("accept-encoding", "gzip, deflate, br")
            .addHeader("user-agent", "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Mobile Safari/537.36")
            .addHeader("accept", "application/json, text/plain, */*")
            .addHeader("origin", "https://contoso.com")
            .addHeader("content-type", "application/json;charset=UTF-8")
            .post(RequestBody.create(MediaType.parse("text/x-markdown"), postBody))
            .build();

What does the line .post(RequestBody.create(MediaType.parse("text/x-markdown"), postBody) do as I think this might be the cause for server response 500.

On face value it looks the like it sets the MIME type, but then how is MIME type different to the content-type above?

What are valid types that can be parsed other than text/x-markdown?




Get all divs with specific class and add

I am trying to collect all div's with a specific class and add a to it. This file includes an overlay, which gathers the users information from a database. Initially I tried adding the file with javascript's innerHtml, but this obviously wont work since it won't run server side. The div's will be added when the user creates an item in the backend/cms and for this reason it is unknown how many div's there will be and how many overlays need to be added. If you guys have any other suggestions for adding the content of a .php file please recommend them.

I hope someone can help me out!




How could i display memory and cpu usage of my minecraft server on my website

So I am trying to display memory and cpu usage of my minecraft server on my website. But i dont know how could i do that. I have searched it up on youtube, but havent found anything.




Can't make POST request because of the CORS problem

Disclaimer: I know this question has been posted a lot of times but even after looking at other topics I still cant figure this out.

I am trying to make a post request to an API using JQuery, with the ajax method, but the browser keeps blocking it due to the Cross Origin policy. I do not own this API and thus I cannot change its code. I have tried multiple solutions, including adding "forbidden headers" to the request.

JQuery code:

$.ajax({
    type: "POST",
    url: "https://vcdn2.space/api/source/" + substring,
    data: payload,
    headers: {
        'origin': 'https://vcdn2.space',
        'sec-fetch-site': 'same-origin',
        'sec-fetch-mode': 'cors',
        'sec-fetch-dest': 'empty',
        'referer': "https://vcdn2.space/v/" + substring
    },
    contentType: "application/x-www-form-urlencoded; charset=utf-8",
    dataType: "json",
    success: function (response) {
        alert("ok1");
    },
    failure: function (response) {
        alert("ok2");
    }

I can make this request without any problems on the server side (using python, Django), but in this case, it needs to be done on the client side. Any ideas?

Thank you in advance




How to get better targetted ads with RevenueHits? [closed]

I've made a kanji learning/testing tool site so there is almost no textual content on the site to target the ads. The result is that I get awful generic ads. Like .... a big button that says download and it leads to a broken url. Has anyone had any luck pushing the system to produce better ads? Hidden text in the site itself gets punished as SEO manipulation, so I'd like to avoid that if possible.

Are RevenueHits ads just terrible? Should I try a different service like PropellerAds? Adsense is not available for tool sites sadly and I'm not sure what the best option is for a tool site.

(Hopefully this isn't too open ended for SO)

Example ad: crappy ad sample




How to Generating XML File [closed]

I am Generating XML File using dataset, yet its work fine

1- But I need to work with Entity Framework Data Tables 2 - Once Generating is Successful I also need to have XSD File From Created XML




Deploying web app on Cloud foundry giving fileNotFoundException

I am trying to push maven application on Pivotal cloud foundary with following manifest file configuration.

applications:
- name: abc-app
  host: abc-app
  instances: 1
  memory: 1024m
  builpack: java_buildpack_beta
  path: ./target/abc-7.0.46-SNAPSHOT.war
  
  JAVA_VERSION: 11.0.6

I want to load properties files like bootstrap.properties and server.properties. How to do that? I am getting this exception while doing cf push from cloud foundary CLI.

       2021-08-30T19:12:42.97+0530 OUT [CONTAINER] loudAutoReconfigurationServletContainerInitializer INFO    Initializing ServletContext with Auto-reconfiguration ApplicationContextInitializers
       2021-08-30T19:12:43.03+0530 OUT [CONTAINER] lina.core.ContainerBase.[Catalina].[localhost].[/] INFO    No Spring WebApplicationInitializer types detected on classpath
       2021-08-30T19:12:43.05+0530 ERR java.io.FileNotFoundException: null/bootstrap.properties (No such file or directory)

Thanks in advance!




website stuck on maintenance mode it is based on this platform https://ift.tt/2WDd9X1

I am working on a website for someone which is based on this platform https://autoprint.atlassian.net/wiki/spaces/KB/overview. I turned on the admin maintenance mode and got myself logged out of admin. Now both the website and admin backed is on maintenance mode. I'm trying to solve this problem but no one has any clue about this platform. website is https://www.mcprintanddesign.com/




Why sir Tim Berners-Lee use web-server to serve html document instead of other ways? [closed]

I have a historical question about why Mr. Tim Berners-Lee uses a web server? I mean he can send HTML in different ways like Peer to peer ( for example like ARPANET ) or send a zip file of HTML via email... but why did he uses a web server when he worked at CERN and what's logic behind it?




Improve my cron script for website change notification

I've been using a script through cron to check if a web page has changed.

Everything is running smoothly but this is my first attempt and I know it could be better. I'm a noob so take it easy.

I've hobbled this together through many sources. The standard services that check if a webpage has changed didn't work on my webpage of instance because each instance created a new shopping cart ID. Instead, I looked for alike with say article:modified_time that was my TextofInterest and it will grab that whole line and compare it to the same line in the prior file.

Things to maybe do better:

  1. I'd like to define each file (.txt, .html, websites) at the beginning.

  2. I've also run into some other code where it looks like it might not have to save to a file and run in memory?

  3. Currently saving to a flash drive (open media vault), I'd like to change the directory to a different drive for the writes of the files.

Any other improvements are welcome.

Here is working code:

#!/bin/bash
cp Current.html Prior.html
wget -O Current.html 'https://websiteofinterest.com/
awk '{if(match($0,"TextofInterest")){s=1} else s=0}s' Prior.html > Prior.txt
awk '{if(match($0,"TextofInterest")){s=1} else s=0}s' Current.html > Current.txt
diff -q Current.txt Prior.txt || diff Current.txt Prior.txt | mail -s "Website Canged" "Emailtosendto@email.com"



Using a xml file for front end on a website

I am creating a blogging website. I have already done the backend in Django. I decided to purchase a template for the front end and they sent me an XML file instead of HTML files. How possible is it for me to install and customize it on my domain? And if its possible, how should I do it?




one link tag in my sidebar is clickable only at the bottom of it [closed]

I have a sidebar in which there are multiple links. all of the links work fine except the top one which is only clickable at some small area in the bottom of that link. Tried changing the order of the links but still the top one will be clickable only at the bottom of it.

I run the code in IOS safari so I do not know if it works on pc.

//sidebar
function openNav() {
  document.getElementById("mySidebar").style.width = "70vw";
  document.getElementById("main").style.marginLeft = "70vw";

  /*lower brightness for everything except sidebar*/
  document.getElementById("indexBox").style.filter = "brightness(50%)";
  document.getElementById("indexBox").style.webkitFilter = "brightness(50%)";
  document.getElementById("indexBox").MozFilter = "brightness(50%)";
  document.getElementById("mySidebar").style.filter = "brightness(100%)";
  document.getElementById("mySidebar").style.webkitFilter = "brightness(100%)";
  document.getElementById("mySidebar").style.MozFilter = "brightness(100%)";
}

/* Set the width of the sidebar to 0 and the left margin of the page content to 0 */
function closeNav() {
  document.getElementById("mySidebar").style.width = "0vw";
  document.getElementById("main").style.marginLeft = "0vw";
  document.getElementById("indexBox").style.filter = "brightness(100%)";
  document.getElementById("indexBox").style.webkitFilter = "brightness(100%)";
  document.getElementById("indexBox").MozFilter = "brightness(100%)";
}
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 2;
  top: 0;
  right: 0;
  background-color: white;
  overflow-x: hidden;
  padding-top: 2vh;
  transition: 0.5s;
  box-shadow: 0 1px black;
}

.sidebar a {
  font-family: 'Heebo-Light';
  text-align: right;
  text-decoration: none;
  font-size: 2.2vh;
  color: #181818;
  display: block;
  transition: 0.3s;
  padding: 2vw;
  margin-right: 5vw;
  width: 100%;
  height: 9vh;
  background-size: 30% 80%;
  background-repeat: no-repeat;
  background-position-x: right;
  z-index: 2;
  pointer-events: all;
}

.sideBarText {
  margin-right: 16vw;
  margin-top: 0.9vh;
}

.sidebar .closebtn {
  position: absolute;
  top: 2vh;
  left: 0;
  font-size: 5vh;
  margin-left: 5vw;
  height: 5vh;
  width: 10vw;
  text-align: center;
}

.openbtn {
  right: 0;
  position: fixed;
  z-index: 1;
  font-size: 3vh;
  cursor: pointer;
  background-color: #001f41;
  color: white;
  border: none;
  height: 7vh;
  border-left: 1px solid grey;
}

#opnBtnT {
  transition: margin-right .5s;
}
<main id="indexBox">
<div id="mySidebar" class="sidebar">
  <img src="../../static/icon.png" alt="Logo" style="position: absolute; width: 60vw; height: 20vh; margin-top: -7vh; right: 0;">
  <hr style="margin-top: 6vh;">
  <div id="sidebarB">
    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">
      <div style="margin-top: -3vh; color: rgb(19, 19, 19);">&times;</div>
    </a>
<!--The sideBar mentinoned is below:-->
    <a href="/" style="background-image: url('../../static/Sketches 57.png');  margin-left: -3vw; height: 9vh;">
      <div class="sideBarText">ראשי</div>
    </a>
    <a href="/reserve" style="background-image: url('../../static/Sketches 57.png');  margin-left: -3vw;">
      <div class="sideBarText">הזמנת מגרש</div>
    </a>
    <a href="#" style="background-image: url('../../static/הצטרפות 2 עם מסגרת.png');  margin-left: -3vw;">
      <div class="sideBarText">הצטרפות למגרש</div>
    </a>
    <a href="#" style="background-image: url('../../static/מפה 1 עם מסגרת.png');  margin-left: -3vw;">
      <div class="sideBarText">מפת מגרשים</div>
    </a>
    <a href="#" style="background-image: url('../../static/פרופיל עם מסגרת.png');  margin-left: -3vw;">
      <div class="sideBarText">הפרופיל שלי</div>
    </a>
    <a href="#" style="background-image: url('../../static/תאים עם מסגרת.png');  margin-left: -3vw;">
      <div class="sideBarText">תנאי שימוש</div>
    </a>
    <hr style="margin-top: 11vh;">
    <a href="/logout" style="position: absolute; background-image: url('../../static/יציאה 1 עם מסגרת.png'); transform: scale(0.9);  margin-left: -0.5vw;">
      <div class="sideBarText" style="font-size: 1.8vh; margin-top: 1.2vh;">התנתקות</div>
    </a>
  </div>
</div>

<div id="main">
  <button class="openbtn" onclick="openNav()"><div style="font-size: 3vh; margin-top: -0.5vh;">&#9776;</div></button>
</div>
</main>



Is there anyway to trigger signal r notification from client application using javascript outside the project?

I have implemented signal R inside my application, Am in a scenario that client needs to send a notification to my hub, Is there any possibility to achieve this using javascript

......Code to get notifcation So the client can execute the script so that I can get the notification here inside my project


google maps iframe doesnt work with sandbox

so this is my code, google maps stop working after adding sandbox attribute, i tried embed it without it and it worked, i'm not sure why and will be happy for help my code:

<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d244882.93248659256!2d-96.26493913191504!3d41.29067020779935!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sil!4v1630314849966!5m2!1sen!2sil" width="550" height="450" style="border:0;" allowfullscreen loading="lazy" sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-top-navigation">

if i cancel sandbox, so its working




which tool is appropriate to design a website for .net core mvc web app?

i would like to design a beautiful website for my web app which developed by .net core mvc, but what is the most efficient method to design it? I looked for the template, but most of them are complicated and hard to integrate into my html..... or the only way is to use bootstrap design whole website?




Is there a way to change my URL to point to a custom port?

As stated in the title, i would like to change (internaly) my URL from:

https://subdomain.example.tech:8081/

to something like:

https://subdomain.example.tech/something/

Is it actually possible? (it's a Docker) thanks for your answers




blob to file conversion returning application/octet-stream other than File in javascript

I am uploadinig images from input fields to firebase storage after compressing the image using canvas. but after uploading the file to the firebase it is in the format application/octet-stream

before i added this compress function, everything went well

my compress function which I copied from here (also done some minor editing):

function compressImg(file) {
    const MAX_WIDTH = 768;
    const MAX_HEIGHT = 1024;
    const MIME_TYPE = "image/jpeg";
    const QUALITY = 0.7;

    var output;
    const blobURL = URL.createObjectURL(file);
    const img = new Image();
    img.src = blobURL;
    img.onerror = function() {
        URL.revokeObjectURL(this.src);
        toastr["error"]("Cannot load image", "Error");
        console.log("Cannot load image");
    };
    img.onload = function() {
        URL.revokeObjectURL(this.src);
        const [newWidth, newHeight] = calculateSize(img, MAX_WIDTH, MAX_HEIGHT);
        const canvas = document.createElement("canvas");
        canvas.width = newWidth;
        canvas.height = newHeight;
        const ctx = canvas.getContext("2d");
        ctx.drawImage(img, 0, 0, newWidth, newHeight);

        canvas.toBlob(
            (blob) => {
                theBlob = blob;
                theBlob.lastModifiedDate = new Date();
                theBlob.name = 'tempName.jpeg';
                output = theBlob;

            },
            MIME_TYPE,
            QUALITY
        );
    };
    return output;
}

function calculateSize(img, maxWidth, maxHeight) {
    let width = img.width;
    let height = img.height;

    // calculate the width and height, constraining the proportions
    if (width > height) {
        if (width > maxWidth) {
            height = Math.round((height * maxWidth) / width);
            width = maxWidth;
        }
    } else {
        if (height > maxHeight) {
            width = Math.round((width * maxHeight) / height);
            height = maxHeight;
        }
    }
    return [width, height];
}

this is how I am uploading to firebase

 var compressedImg = compressImg(imageList[i]);
 await ref.put(compressedImg);



How to link a js script in a template web component (vanilla js)?

I am working on a web component to display cards in my web page. In the example, the initial card uses a link to a js script (tiltjs). I would like to know how to call the script in my web component template card? So that this card can also use the tiltjs script.

Thanks for your help.

Link: https://codepen.io/nicolastilly/pen/eYRJNEj?editors=1010

My code:

<!-- html card -->
<div class="carte1">
        <div class="card" data-tilt data-tilt-scale="1.04">
            <div class="front">
                <p class="card-title">
                    Title
                </p>
                <div class="extension">
                    ✻
                </div>
                <div class="numero">
                    0/8
                </div>
            </div>
            <div class="back"></div>
        </div>
    </div>


<br><br><br><br>

<!--web component card-->
<card-model></card-model>

<template>
    <style>
        .card {
            width: 300px;
            height: 450px;
            border-radius: 20px;
            background-color: #ccc;
            position: relative;
        }

        .card-title {
            font-family: "SpaceGrotesk-Light";
            position: absolute;
            text-align: center;
            margin: auto;
            left: 0;
            right: 0;
            top: 20px;
            font-size: 18px;
            color: black;
        }

        .extension {
            font-family: "SpaceGrotesk-Light";
            position: absolute;
            bottom: 20px;
            left: 20px;
            color: black;
        }

        .numero {
            font-family: "SpaceGrotesk-Light";
            position: absolute;
            bottom: 20px;
            right: 20px;
            color: black;
        }

        .front {
            background-color: #ccc;
            border-radius: 20px;
        }

        .back {
            border-radius: 20px;
            background-color: #ffffff;
            opacity: 1;
            background-image: linear-gradient(30deg,
                    #000000 12%,
                    transparent 12.5%,
                    transparent 87%,
                    #000000 87.5%,
                    #000000),
                linear-gradient(150deg,
                    #000000 12%,
                    transparent 12.5%,
                    transparent 87%,
                    #000000 87.5%,
                    #000000),
                linear-gradient(30deg,
                    #000000 12%,
                    transparent 12.5%,
                    transparent 87%,
                    #000000 87.5%,
                    #000000),
                linear-gradient(150deg,
                    #000000 12%,
                    transparent 12.5%,
                    transparent 87%,
                    #000000 87.5%,
                    #000000),
                linear-gradient(60deg,
                    #00000077 25%,
                    transparent 25.5%,
                    transparent 75%,
                    #00000077 75%,
                    #00000077),
                linear-gradient(60deg,
                    #00000077 25%,
                    transparent 25.5%,
                    transparent 75%,
                    #00000077 75%,
                    #00000077);
            background-size: 20px 35px;
            background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;
        }
    </style>

    <div class="carte1">
        <div class="card" data-tilt data-tilt-scale="1.04">
            <div class="front">
                <p class="card-title">
                    Web component card
                </p>
                <div class="extension">
                    ✻
                </div>
                <div class="numero">
                    0/8
                </div>
            </div>
            <div class="back"></div>
        </div>
    </div>

</template>


//js 

class cardModel extends HTMLElement {
    constructor() {
        super();
        this.attachShadow({ mode: "open" });
        const template = document.querySelector("template");
        this.shadowRoot.appendChild(template.content.cloneNode(true));

    }

}
window.customElements.define("card-model", cardModel);
```



Deploying Wt application on domain

maybe it's not a completely correct question, but I just need some direction to move in. I have my Wt app and I have a domain on domain.com. What is the best/easiest way to deploy my app on it? I tried to use Github Pages and of course, it requires HTML but Wt is kinda back-end + front-end already and it's an exe so I don't really know what to do. Also, I thought about just using something like WordPress but I'm not sure if I get the option to use the exe file or just only upload some HTML and css files.

Also, I tried to reach domain using my app by prescribing the address of my domain, but had errors like "failed to resolve address". Maybe I just need to write some DNS rules in the domain's properties? Help please




How can i create a HTML page with python? [closed]

I want to create a python code that can check the prices of different cryptocurrencies in different markets and compare them side by side on a HTML page and return a percentage difference

What would i need to go learn to be able to do this




Im trying to add an image gallery to my website

It needs to be a fixed size and display one image at a time allowing you to click to the next image. I tried using light box but I couldn't get it to display only one image at a fixed size imbedded in the website. Does anyone know of a way to make a gallery like this.




How long does it take for my own website to fully update and show the new changes that I have made?

I have recently made some changes to my website, like changing the font, customised the scroll bar and positioned some elements. After uploading it to my web hosting server, I have noticed that nothing has changed.

I know that by clearing the cache in my browser I can see the changes and everything's perfect, but is there any other way? If I wait longer , will the changes automatically be made? if so, how long will it take?




How can i run a website if the Web Server goes down? [duplicate]

In a controlled environment I need some machines to always load the website. If the Web Server is down it should load the website from the last visit. I want to solve this because I don't want to run a Web server on each machine.




HTML web crawler

I am trying to get the text under tag in this website, below is the source code from that website, I want to access the number 110817 in the tag. Here is my code,however it shows 'NoneType' object has no attribute 'a' Please help me with this issue!

import requests
request_html = requests.get("https://www.ibon.com.tw/retail_inquiry.aspx#gsc.tab=0")
from bs4 import BeautifulSoup
soup = BeautifulSoup(request_html.text, "html.parser")

for i in soup.find_all(class_='banner'):
    print(i.find('a').text)

enter image description here




Typescript: Module imported from another package with absolute path resolves any

I'm using VSCode and Typescript 4.3.5

my project structure is like this:

project
├── module-a
│   ├── src
│   │   ├──model
│   │   │  └── hello.ts
│   │   └── index.ts
│   └── tsconfig.json
└── module-b
    ├── src
    │   └── index.ts
    └── tsconfig.json

tsconfig:

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "module": "esnext",
    "moduleResolution": "node",
    "baseUrl": "./src",
    "rootDir": "../"
  },
}

module-a/src/model/hello.ts:

export const hello = () => console.log('hello');

module-a/src/index.ts:

import { hello } from 'model/hello'

const a = {
  hello,
  text: 'world'
}

export default a

module-b/src/index.ts

import a from '../../module-a/src'

type A = typeof a

/**
type A = {
  hello: any;
  text: string;
}
*/

Here's the problem, type A resolves { hello: any; text: string; }, and if I change the import in module-a/src/index.ts to a relative path:

import { hello } from './model/hello'

then type A is correctly resolved to { hello: () => string; text: string }

Is this a bug or expected?




dimanche 29 août 2021

Entering an image into a form on a website (Python)

There is a website with license plate recognition: https://www.doubango.org/webapps/alpr/

I want to write a code that will accept an image with a car number as input, process it, give a number in the form of a text.

How can I refer to the form for receiving images on the site, which libraries to use for convenience. I already understand that requests, but how exactly I can not understand. I have already read so much information about post, get, but there is no understanding of how to apply the picture to the form.




Self hosted website software for file uploads?

Where I work, I get a lot of large file sent to me often, and I’m tired of people saying the file is too big to send over email. I’m interested in IT and networking amongst other things. so I’m looking for software(s) for Linux that will let me host my own website, where my co workers can log in with a username and password and upload files to a self hosted NAS at my house.

Any suggestions?

Thanks in advance




How to Show hidden Paths from api

is it possible to find hidden paths and files of a Website and/or API when it hasnt got any docs about the Paths and endpoints?




@media Query not responding in chrome

So I'm trying to get this page to be responsive.. It works in firefox, and in chromes inspect tool, but regularly resizing chromes browser doesn't yield any results.

@media screen and (min-width:600px) {
#form {
    width:600px;
    grid-template-rows: 100%;
}
form {
    display:grid;
    grid-template-columns: 2fr 4fr;
    grid-template-rows: 20% 20% 20% 20% 20%;
}

body {background-color:red;}

}

@media screen and (max-width:599px) {
#form, label, input, select, textarea {
    width:100% !important;
    margin-bottom:0px;
}
form {
    display:block !important;
    }
span {
    height:40px;
    width:100%;
    display:inline-block;
}
body {background-color:blue;}

}

I have tried making sure its updating and setting colors to different media queries to see when they kick in, it never goes blue in chrome except in responsive mode.




Deploying multiple domains using nginx

I've been searching for a while to fix this issue but I can't seem to figure it out.

So basically, I've just bought a new domain and I am looking to host it on the same server I am hosting my other one on. However, I seem to be coming across this bug where whenever I try to load my second domain, it loads for a bit then gives me a cloudflare timeout error (522). My first domain always loads correctly though. I did notice something weird though, whenever I remove the first server {} block, it starts loading what is supposed to be loaded on my second domain, on my first. Anywho, here's my config:

server {
    listen 80;
    listen [::]:80;

    listen 443 ssl;
    listen [::]:443 ssl;
    ssl on;
    ssl_certificate /etc/ssl/certs/server_pnyxdev.pem;
    ssl_certificate_key /etc/ssl/private/server_pnyxdev.key;

    root /var/www/html/pnyxdev;

    index index.php index.html;

    server_name pnyx.dev;

    location / {
        proxy_pass    http://localhost:18528/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        # try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

server {
    listen 80;
    listen [::]:80;

    listen 443 ssl;
    listen [::]:443 ssl;
    ssl on;
    ssl_certificate /etc/ssl/certs/server_ethanpro.pem;
    ssl_certificate_key /etc/ssl/private/server_ethanpro.key;

    root /var/www/html/ethanpro;

    index index.php index.html;

    server_name ethan.pro;

    location / {
        proxy_pass    http://localhost:1234/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host "ethan.pro";
        proxy_cache_bypass $http_upgrade;
        # try_files $uri $uri/ =404;
    }

    location ~ /\.ht {
        deny all;
    }
}   



(Need suggestions/advice) Im trying to make an offline Video player (like youtube) for a local network/LAN

The website I host is on my PC using xampp as a local server

what I want to do is to be able to watch videos on my PC (local files like in C:/ and D:/) from any device on a youtube like website as long as we are on the same wifi.

Here is the problem I have to get around:

at first, it wasn't my plan to use the website over a local network, so it was easy to put sources of videos as "file:///c:/video.mp4" and allow firefox to access local files but now that i access it on a different device it does not work because there is no "file:///c:/video.mp4" on that device

I don't want to store all the videos in htdocs as its not possible since those videos are in different directories.

I have no knowledge about how the backend works and this is my first web dev project so I have no idea how to do this

how can I stream a video that's stored locally on one computer to another? is it possible? (please don't kill me I'm new here)




what is difference between flutter web and front-end (nomalys)

I have this question from the first time Flatter Web The answer to this question will save time for many mobile developers. And I want to know what their respective advantages are.




Javascript and API fails to fetch [closed]

I have a problem with my script made in javascript. I use to show on my website a football predictions taken from an API Service (RapidAPI). The script works well but it often happens that when it fails to fetch a single prediction (the console tells me error 500) practically everything freezes and does not show me any result on my website. I can't paste the entire code here but you can find all the code on www.mondobet.it

Hope you can help me. Thanks a lot.




I want my tag to display after 5s in css

I have a heading <h1>I am Heading</h1> with animation properties and I want to display my <p>I am Paragraph</p> to display after heading fully loaded




Passing invisible arguments on Flask

today I had a problem, I tried to pass an argument without make it visible, but if I use: return redirect(url_for('results.get_chapters', title=button)) the variable "button" is visible on the link for example:

https://localhost:5000/variabletext

Anyone knows a solution without using session method from Flask (it can create problems on my code)?




Extract web Table with Excel

I'm trying to extract data from a Web table using Excel.

The web is: https://www.bankrate.com/retirement/best-and-worst-states-for-retirement/

I use Option extract from web of the Data Menu: enter image description here

The problem is thta header of this Web table is not retrieved, while if we execute the same anothe other url (for example : http://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations ) , header is properly retrieved.

Web table: Web table

Excel table imported:

screenshot excel

Is there ny "option", "configuration", etc in excel that allows you to automatically include header?




I am getting an operational error in django 2.1 [duplicate]

Ok so i am getting an operational error where the request method is POST when I try to add a product through the admin panel. This is the view of the error

Here is some relevant code I used

models.py

from django.db import models


class Product(models.Model):
    name = models.CharField(max_length=255)
    price = models.FloatField()
    stock = models.IntegerField()
    image_url = models.CharField(max_length=2100)


class Offer(models.Model):
    code = models.CharField(max_length=8)
    description = models.CharField(max_length=255)
    discount = models.FloatField()

code in admin.py

from django.contrib import admin
from .models import Product


admin.site.register(Product)

If you need some other code, please tell me

What do I do?