lundi 30 novembre 2020

Proportional shift of blocks to the sides when increasing one of the blocks in pure css and js

There are 3 blocks with images, the task is that when you click on the blocks, they increase from the center to the full width of the screen. Question: How to make it so that when a block is enlarged, adjacent blocks are proportionally shifted to the sides, while when the block ceases to fit, it leaves the screen in the right direction? Example: when you click on the central block, the left one is shifted to the left (and when it ceases to fit it goes beyond the screen, like the left one now!), The right one - to the right, the top one - up, the central one evenly increases from the center to the entire screen pushing out all other blocks?

  function classToggle() {
    this.classList.toggle('header__100');
}
document.querySelector('#header').addEventListener('click', classToggle);
function classToggle() {
    this.classList.toggle('header__100');
}
document.querySelector('#header2').addEventListener('click', classToggle);
function classToggle() {
    this.classList.toggle('header__100');
}
document.querySelector('#header4').addEventListener('click', classToggle);
function classToggle() {
    this.classList.toggle('header__100');
}
.container {
  white-space: nowrap;
}

#header {
  line-height: 20px;
  text-align: center;
  background: crimson;
  color: white;
  width: 20%;
}

#header2 {
  line-height: 20px;
  text-align: center;
  background: black;
  color: white;
    width: 20%;

}

#header3 {
  line-height: 20px;
  text-align: center;
  background: red;
  color: white;
  width: 20%;

}

#header4 {
  line-height: 20px;
  text-align: center;
  background: red;
  color: white;
  width: 20%;

}

.header {
  height: 20px;
  transition: width 10s, height 10s;
  transform: translate(-50%. -50%);
    display: inline-block;

}

.header__20 {
  height: 20px;

}

.header__100 {
  height: 100vh;
  width: 100vw!important;
}

img {
  width: 100%;
  
}
 <div class="container">
<div id="header3" class="header"><img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" /></div>
<div id="header" class="header"><img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" /></div>
<div id="header2" class="header"><img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" /></div><br>
<div id="header4" class="header"><img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" /></div>

</div>



Using Javascript to make a virtual camera that works on windows

I want to make a webapp that takes input from you camera, changes it, and then outputs the resulting video as a virtual camera input that you can use on windows 10. And I want to use javascript so it can run without any installation.

I know that there is a MediaDevices.getUserMedia(), But to my knowledge, this is a method that gets the input from the users camera, not a method that outputs a virtual camera input to the user's computer.

Is there any method that I can use?




Where to start with publishing my website?

devs. I spent last few years learning javascript, it's ecosystem, web technologies all on my own and I feel pretty confident in those. Recently I wanted to start my own blog. So I got a raspberry pi (I want to host the website on the pi) and installed Arch Linux on it. But the problem is that I lack the backend knowledge - How to set up the webserver, port forwarding, pushing to production (I want a way to code the website locally and then with a single command "push it to production" instead of having to manually upload files to the server). Plus security is something else I lack the knowledge and yes, I can go and follow any of the available guides out there on how to host your website at home but most of them simply give you the steps without explaining how it all works and this makes me extremely anxious. This thing is gonna be online, it will represent me. I have to understand things under the hood. I have basic Linux knowledge. Where to start guys? I want the quickest path (since learning Linux administration in-depth takes years, backend too..) to learning how to work with this server, take care of it (nothing complex) I just wanna make sure that my server will be up and running, well supported by its owner (me), well secured (and how to do the backups too). If you know something like a single source, a book, a course explaining the matter of how a person can run his own webserver, please share it with me down below.

Thanks, webmaster_project




Forms Authentication with customization url asp.net

<authentication mode="Forms">
         <forms loginUrl="~/INDEX.aspx" defaultUrl="~/Budget.aspx"></forms>
     </authentication>
     <authorization>
         <deny users="?"/>
</authorization>

I have this code working but it covered all my pages. I cannot access my register page. is there anyway I can exclude my register.aspx page ?




Display MySQL table data in web page

I have queried the database and want to display the data in the table on the dashboard web page.

const getData = () => {


        db.query('SELECT * FROM classes', async (error, results) => {
            if (error) {
                console.log(error);
    
            }
            else {
    
                console.log(results)
    
    
            }
        })
    
    }
    
    getData();

I am using nodejs and ejs. What would i need to add inside my dashboard page to get the data displayed in console.log to display on the web page instead.

Below is the current code for my dashboard page.

 <h1 class="text-center mb-3"><i class="fas fa-sign-in-alt"></i>Admin Dashboard</h1>
    <table class="table table-dark">
      <thead>
        <tr>
          <th scope="col"></th>
          <th scope="col">Student Name</th>
          <th scope="col">Gender</th>
          <th scope="col">Set</th>
          <th scope="col">Result</th>
        </tr>
      </thead>
    </table>



Missing font on a SVG logo

I have an SVG logo that has been designed with the Nunito Sans font. The font is showing correctly on the website only if the font is installed on the computer. Please find below the code from the SVG image

<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 501.58 501.58"><defs><style>.cls-1{fill:#243d62;stroke:#1d1d1b;stroke-miterlimit:10;}.cls-2{font-size:99.93px;fill:#fff;font-family:Nunito Sans;font-weight:700;}.cls-3{letter-spacing:-1px;}</style></defs><title>Logo512x512</title><circle class="cls-1" cx="250.79" cy="250.79" r="250.29"/><text class="cls-2" transform="translate(25.25 279.94)"><tspan class="cls-3">P</tspan><tspan x="64.66" y="0">acAnGO</tspan></text></svg>

I tried to save the fonts on the website but it never worked. As the Nunito Sans belong to Google, is there a way to assign it though a web link? If not what will be the correct code to link the font to the SVG logo? Thanks




web design(UI/UX) and front-end development are same?

Someone says that web design(UI/UX) and front-end development are the same. Someone says that web design(UI/UX) and front-end development are the same. Someone says that web design(UI/UX) and front-end development are the same.




Flutter Web - Scrolling is very laggy for large number of images

I have a Flutter website built on channel beta that is used for uploading large images. When testing on Chrome, scrolling down when there are large number of image rows it is extremely laggy.

Below is a sample reproduction of the code

import 'package:flutter/material.dart';
import 'package:flutter_dropzone/flutter_dropzone.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  DropzoneViewController controller1;
  String message1 = 'Drop something here';
  bool highlighted1 = false;
  List assets = [];
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Scaffold(
          appBar: AppBar(
            title: const Text('Dropzone example'),
          ),
          body: ListView(
            children: [
              if (assets.length > 0)
                _showAssets(assets)
              else
                buildZone1(context),
              Padding(
                padding: const EdgeInsets.all(30),
                child: Container(
                  width: 100,
                  child: MaterialButton(
                    color: Colors.greenAccent,
                    child: Text('Browse files'),
                    onPressed: () =>
                        controller1.pickFiles(multiple: true).then((files) {
                      files.forEach((file) {
                        controller1.createFileUrl(file).then((url) {
                          setState(() {
                            print('in set state');
                            assets.add(url);
                          });
                        });
                      });
                    }),
                  ),
                ),
              ),
              Container(height: 400, color: Colors.lightGreen),
              Container(height: 400, color: Colors.redAccent),
            ],
          ),
        ),
      );
  Widget _showAssets(List assets) {
    //print(assets);
    return Wrap(
      children: assets.map((asset) {
        return Container(
          height: 150,
          child: Image.network(asset),
        );
      }).toList(),
    );
  }

  Widget buildZone1(BuildContext context) => Builder(
        builder: (context) => Container(
          height: 200,
          child: DropzoneView(
            operation: DragOperation.copy,
            cursor: CursorType.grab,
            onCreated: (ctrl) => controller1 = ctrl,
            onLoaded: () => print('Zone 1 loaded'),
            onError: (ev) => print('Zone 1 error: $ev'),
            onHover: () {
              setState(() => highlighted1 = true);
              //print('Zone 1 hovered');
            },
            onLeave: () {
              setState(() => highlighted1 = false);
              //print('Zone 1 left');
            },
            onDrop: (ev) {
              print('Zone 1 drop: ${ev.name}');
              setState(() {
                print('in set state');
                message1 = '${ev.name} dropped';
                highlighted1 = false;
              });
            },
          ),
        ),
      );
}

pubspec.yaml

name: file_upload
description: A new Flutter project.


publish_to: 'none' 

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_dropzone: ^1.0.9


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.1

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

To reproduce

  • Click on Browse files and select over 50 to 100 images of over 2MB to display over 10 rows
  • Try to scroll down when the images are visible



How do you scrape an iframe tag?

I am trying to scrape the inside of the iframe tag in the following website to get the text of the flashcard. I am trying to scrape the website with python, but no matter what I do, it does not seem to work. How would one go about scraping the following iframe tag?

https://sadlierconnect.com/anonymous/viewResource.html?resourceID=68983&programTOCId=2563&alias=vw&eventId=LmcHno8BquIxTTWR&eventValidation=7e8ad357ec6593fdd56e6df506be7c7c._.I3Z7e1ea_QI6U-6clmR9dvJ1EYR_X6XwW6jyx7U4aygmeMJd2mpp0-vAUQxEP4-0Mm6bbzkP8uVXOwa-NPZ31g~~




How to implement Google Search bar in HTML website?

Long time lurker here. Is that any possible way to implement Google Search bar in basic HTML website? I have tried it and succeeded, but I have this one issue - it keeps redirecting me to Google Search itself. I need to print the output and display it right on the website. In the form that the user inputs something and instead of redirecting to Google, it prints the first page of search results right on the website, for example underneath "Results" title.

Also, second question - how to allow the user to download the page? For example, it prints the results and underneath is "Download" button that lets him save the page in whatever format he chooses.

Thanks a ton!

EDIT: So far I have come up with this code:

<html>
<p><strong>Vyhled&aacute;v&aacute;n&iacute; na Googlu</strong></p>
<body>
<form method="get" action="http://www.google.com/search">
<div style="border:1px solid black;padding:4px;width:20em;">
  <table border="0" align="center" cellpadding="0">
  <tr><td>
  <input type="text"   name="q" size="25"
  maxlength="255" value="" />
  <input type="submit" value="Google Search" /></td></tr>
  <tr><td align="center" style="font-size:75%">
  <input type="radio"  name="sitesearch" value="" />Web
  <input type="radio"  name="sitesearch"
  value="yoursite.com" checked /> Pouze tato stránka<br />
  </td></tr></table>
  </div>
</form>
<p><br><br><b>Výsledky:</b></p>
<form method="get" action="test.html">
   <button type="submit">Stáhnout stránku</button>
</form>
<a href="test.html" download>Stáhnout</a>
</body>
</html>



Why are IP addresses of users on my website constantly changing?

I have two websites - one running on cpanel and other one on Amazon AWS Lightsail. On both of them I have Wordpress website and implemented plugin with voting system (exactly the same) and on the first one it is working perfectly - it bans users if they already voted for the picture (checking their ip address from database) but on the second one it is constantly changing IP Address so it can't stop it from voting again.

How can I solve this? How can I set for the users to always have the same IP Address so my plugin will work on both websites exactly the same?

Thanks!




Is Laravel Nova the right fit for this web-app? [closed]

I have a couple of questions about a project I want to embark on, it's a CRUD 'project' management web-app to manage my life, school, and work. I just found out about Laravel Nova. It sounds like it's just what I need but I keep reading that it's only good for 'basic crud apps' but without specifying how basic 'basic' is.

Everything I'll be doing will be open source for anyone that wants to create something similar (without the Nova files of course)! The following is the very basic outline of what I'm going to build. All I want to know is whether Nova is the appropriate software to use. And if it isn't, suggestions are always welcome!

Web-app flow:

Upon logging in, users get shown a personalized dashboard. For normal users, this would contain a table with all of the projects they're assigned to. For admins, it will also show a table of projects they administer. In each row a project title, short description, etc. with a link to the project's page.

On a project page, the user is shown the project information and another table with all of the project's files. These are the project-specific files uploaded by read-write or admin users and have to be downloadable for all assigned users. Also, a kind of logging system to see which users have opened what files and when would be great. It goes without saying but, users must only be able to see and access the projects to which they have been assigned.

Project functionalities:

  • Has to be CRUD Has to be able to hold files and have them be
  • downloadable for assigned users

Admin functionalities:

  • Admins can create projects
  • Admins can assign/invite users to a project with either read or read-write permissions (mainly for uploading/downloading files, mostly PDF files)
  • Admins can select users from within a project to which to send an email and/or notification. Could be for updates, newly available files e.g. Preferably by entering a form in which all users are listed and selectable by checkbox
  • Admins can see who and when opened/downloaded a file

User functionalities:

  • Users get a dashboard with a table in which all of the (and only the) projects they're assigned to get shown
  • In this table is a link/button to a project page in which all of the project's information is shown
  • Read-write and admin users can upload files to a project to be downloadable for all assigned users

Thank you in advance,

Loremnn




deploy REST API Spring Boot Application

I'm learning to build a REST API server with java Spring boot(backend), React JS application (frontend), and My SQL DataBase. Everything is working perfectly in the local system.

I want to deploy my application to could that make it available online. that means:

1- Database service to deploy My SQL DB and the server can access the DB.

2- deploy and run Java server (Spring boot) in the cloud and how the client-side (React js)can connect to the server (IP address? etc or what?).

3- also the deploy frontend and get a web domain.

what is the best platform to do that? the easiest, and cheapest.

what I should learn to do that? and what are the process steps?




Lists in navigation bar would not hide itself when responsive hamburger menu appears in small screen

I'm trying to create a responsive navigation bar for mobile users. Basically, I want the lists in the navigation bar to hide itself in small screen and the lists will be hidden inside hamburger menu.

When hamburger menu shows up in small screen, I want the menu lists to go inside it, but I'm having issue of finding the answer..

Here is my HTML

<div class="top">
      <div class = "center">
        <h><a href="home.html">J[a]son</a></h>
        <p>Personal Blog</p>
      </div>
      <nav class = "top_child">
        <div class = "logos">
          <a href="https://github.com/j-ahn94" target="_blank" class="fa fa-github"></a>
          <a href="https://stackoverflow.com/users/14266888/jason-a" target="_blank" class="fa fa-stack-overflow"></a>
          <a href="https://www.linkedin.com/in/jasonja-ahn/" target="_blank" class="fa fa-linkedin"></a>
        </div>
        <div class = "nav" id="myTopnav">
          <ul>
            <li><a href="home.html">HOME</a></li>
            <li><a href="">PHOTOGRAPHY</a>
              <ul class="photography_1">
                <li><a href="photography_colour.html">Colour</a></li>
                <li><a href="photography_black.html">Black</a></li>
              </ul>
            </li>
            <li><a href="coding.html">CODING</a></li>
            <li><a href="about.html">ABOUT</a></li>
            <a href="javascript:void(0);" class="icon" onclick="myFunction()">
              <i class="fa fa-bars"></i>
            </a>
          </ul>
        </div>
      </nav>
    </div>

Here is my CSS

.top {
    margin: auto;
    /*padding: 0.5em;*/
    padding-top: 0.5em;
    padding-right: 0.5em;
    padding-left: 0.5em;
    background-color: black;
    top: 0;
    display: block;
    position: sticky;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    z-index: 100;
    clear: both;
}

.top p {
    color: white;
    font-size: 10px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}

.center {
    text-align: center;
}

.center a{
    color: rgb(224, 224, 228);
    font-size: 1.5em;
}

.center a:hover{
    text-decoration: none;
    color: rgb(224, 224, 228);
}

.nav {
    float: right;
    position: relative;
    list-style: none;
    display: block;
}

.nav a {
    color: white;
}

.nav li {
    display: inline;
    list-style: none;
    position: relative;
    overflow: hidden;
}

.nav .icon {
    display: none;
}

@media screen and (max-width: 600px) {
    .nav a:not(:first-child) {display: none;}
    .nav a.icon {
        float: right;
        display: block;
    }
}

@media screen and (max-width: 600px) {
    .nav.responsive {position:relative;}
    .nav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }
    .nav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

Here is my JavaScript

function myFunction() {
    var x = document.getElementById("mynav");
    if (x.className === "nav") {
      x.className += " responsive";
    } else {
      x.className = "nav";
    }
  }




WEB Log management

We are preparing our SIEM in our company. We have WAF,IPS,IDS.
I have few questions about logs
1- Should we log HTTP request Post body?
2- Should we log HTTP response Body?
3- If we log HTTP request and body, should we log it in software or load balancer or web application server?

Thanks




How do I make a Hyperlink/URL open a specific website in Chrome?

I need to send some meeting links to many clients to participate in an online meeting.

  • Problem: Link will open in default browser and only Chrome is supported
  • How to: Make an Hyperlink/URL that they click which will open "exampleWebsite.com" in Chrome.

I had thought about how e.g. zoom asks to open Zoom Meeting app when clicking a Zoom Link.

Not desired solution: Desktop shortcut




Getting first image URL from a website using excel vba

I have been trying to get one image URL only from a website, So far I'm successful of getting ALL the image but I only need the second result because the first is like this (data:image/svg+xml;base64,PHN2ZyB4b.....) which I don't need. I only need this result (https://website/v1606373379/N37935382A_1.jpg) but I only want one as well and there total of more or less 10 images in the website.

Sample HTML of the image that I want.

<img id="currentImage" style="width: 100%; border: 1px solid #eee;" src=" https://website/v1606067766/N41880794A_1.jpg ">

This is what I have come up so far:

Sub Image()

Dim ie As InternetExplorer
Dim ht As HTMLDocument
Dim SourceCell As Range
Dim ElementCol As Object, Link As Object
Dim ecol As Long

Set ie = New InternetExplorer


For Each SourceCell In Sheets("Sheet1").Range("C2:C4")

If IsEmpty(SourceCell) = True Then

MsgBox "END!"

Exit Sub
   
End If

If IsEmpty(SourceCell) = False Then

    With ie
      .navigate SourceCell
      .Visible = True
    End With
    Do While ie.Busy
      DoEvents
    Loop
    
End If

Set ht = ie.document

Application.Wait (Now + TimeValue("00:00:02"))



    Set ElementCol = ht.getElementsByTagName("img")


    For Each Link In ElementCol
    ecol = Sheet2.Cells(Rows.Count, 1).End(xlUp).row + 1
    Cells(ecol, 1).Value = Link.src

Next

Next

End Sub



How can you know if your webcam got hacked a few days ago?

How can you know if your built in laptop webcam got hacked a few days ago? I have HP elitebook. Is it possible for anyone to deactivate HP camera's LED while turning on the camera? I have checked thoroughly in my computer and haven't experienced any such abnormal behaviour like mouse moving on it own or icons misplaced and have not found any recorded files or images as well. My security settings are also on. Windows firewall and antivirus settings are also on. but I have this paranoia that someone might have hacked my webcam. Is there a way to know through logs or networking? If a hacker disables LED on camera then it should not turn on when I turn on the camera myself too right?




How save external csv using fetch Javascript to localForage (not localStorage)?

I try to save csv from outside, in response i see that i receive csv, but how to save it in localForage?

const url = "http://test.com/1.csv"; // site that doesn’t send Access-Control-*

fetch(url, {
    mode: "no-cors",
    headers: {
      'Content-Type': 'text/csv'
    }
  })

  .then(response => {
    return response.ok ? response.text() : Promise.reject(response.status);
  })




  .then(text => {
    return localforage.setItem('csv2', text)

  })
  .catch(error => console.log("Can’t access " + url + " response. Blocked by browser?" + error))



What type of hosting/server suits me?

I am thinking of starting a small web development company. We have made our own versatile and user friendly cms written in PHP. Someone needing a website will approach to us and we will make website and launch through our self provided hosting as we won't give our client direct access to server or even cpanel. All works of client are handeled by control panel we have made. So now we are wondering how to launch every user site. I mean each website should have its own virtual server or simply each website should not share bandwith or should not affect each other similar like individual VPS for individual site. Then how can we do so, by creating a droplet for ever web in digital ocean or renting a dedicated server. Or cloud hosting like AWS google cloud?




Scale images when clicked to full screen

There is a container consisting of several images, when you click on an image, it should smoothly zoom (sclale) to the full width of the container, pushing all other images as they expand. How to make the image fill the full width of the container after zooming and is centered?

var current = {
        x: 0,
        y: 0,
        zoom: 1
    },
    con = document.getElementById('container');

con.onclick = function(e) {
    var coef = e.shiftKey || e.ctrlKey ? 0.5 : 3,
        nz = current.zoom * coef;
    con.style.transform = 'translate(' + '-50%, ' + '-50%) ' +
        'scale(' + nz + ')';
};
html, body {
    margin: 0;
    padding: 0;
}

#container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 0 0 0;
    transition: transform 0.3s;
    transition-timing-function: ease-in-out;
    transform: translate(0,0) scale(1);
    background: #000;
}

.item {
    position: absolute;
}

img {
    width: 50%;
    height: 50%;
}
<div id="container">
    <div class="item">
        <img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" />
        <img src="http://codelamp.uk/images/jsf/blue_parrot_wallpaper-normal.jpg" />
    </div>
</div>



dimanche 29 novembre 2020

how to remove request header cache-control on chrome

when I use chrome to visit my index.html(http://49.232.66.45:8080/), I find the request header automatically has Cache-Control: max-age=0, why do this happen? (I use nginx 1.16 and all config is default ant when I visited port 80,It is ok,ant request header do not have cache-control)?。and in this case ,each time I refresh my website,the index.html was get from nginx by network with status 200, I just want to get it from cache or by 304. I want to remove "cache-control" in request header。 I try several methods below,and they do not work ,what should I do?

1.add meta in my index.html (not work)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="cache-control" content="max-age=3600">
    <title>Title</title>
</head>
<body>
hello,cache
</body>
</html>

2.change nginx config (not work) enter image description here enter image description here enter image description here

it seems the request header do effect matter!

I just want to remove cache-control in request header,and want to know the reason why it automatically add? need you help!




Not propperly routing in reversed proxy Laravel App

I have configurated an Apache Server which uses reverse proxy to show a web app developed in laravel and mounted in another apache web server. Let's say that the domain is myapp.app Which works properly, but when I click to a subdomain, let's say myapp.app/register the browser returns myapp.appregister/.

At the moment I've configurated my webserver as it follows:

  <IfModule mod_ssl.c>
<VirtualHost *:443>
             SSLEngine On
             ServerName myapp.app
             <Proxy *>
                Order deny,allow
                Allow from all
             </Proxy>
             <Location "/">
                RequestHeader set X-Forwarded-Proto https
                RequestHeader set X-Forwarded-Ssl on
                RequestHeader set X-Url-Scheme https
             </Location>
             ProxyPreserveHost on
             ProxyPass         /        http://172.31.0.234/
             ProxyPassReverse  /        http://172.31.0.234/
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias www.redes-erdica.tech
SSLCertificateFile /***.pem
SSLCertificateKeyFile /***.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:80>
             ServerName myapp.app
             Redirect permanent / https://myapp.app/
</VirtualHost>
</IfModule>

And the config file for the inner apache server has no other configurations besides the location of the laravel Project. Some curious event that happens is that if I type manually myapp.app/register it sends me where it should be, so why the browser sends me in a wrong direct when I click in the register button?

In addition, the app in localserver works properly.




Website doesn't move to the selected page

Recently, my website doesn't move to the selected page when clicked on the menu. It was working fine before, and I didn't change anything, so I don't know what causes this issue. It was designed to move to galleries showing images of artworks when clicked on the menu shown on the left. It's currently showing only the first gallery even though I click the button on the menu to see other galleries. [www.hyunsoooh.com][1]

The main php file is below. Any help appreciated. My apology if this question is duplicated, but I have searched for the similar issues many times before I post this question.

<?php
$localhost="localhost";
$mysqluser="zw8ttp5_uhyunso_";
$mysqlpwd="masterpainter";
$mysqldb="zw8ttp5_hyunsooohcom_445635_db1";

$gallery = $HTTP_GET_VARS["gallery"];
$page = $HTTP_GET_VARS["page"];


if ($page=="") $page = "gallery" ;
if ($gallery=="") $gallery = 14 ;


// Creating a database connection

   $connection = mysqli_connect($localhost, $mysqluser, $mysqlpwd);
   if (!$connection) {
        die("Database connection failed: " . mysqli_connect_error());
   }


   // Selecting a database 

   $db_select = mysqli_select_db($connection, $mysqldb);
   if (!$db_select) {
    die("Database selection failed: " . mysqli_connect_error());
   }

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>HYUN SOO OH</title>
<link type="text/css" rel="stylesheet" href="style.css" /> 


<!-- SHADOWBOX -->
<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
   overlayColor:    ["#a1a182"],
   overlayOpacity:  [1.0],
   viewportPadding: [20],
   players: ["img", "qt", "iframe"]
});
</script>
<!-- SHADOWBOX -->



</head>

<body>

<div id="framecontent">
<div class="leftwrapper">

<h1><a href="http://www.hyunsoooh.com"><img src="images/hyunsoooh.jpg" alt="Hyun Soo Oh" /></a></h1>

<h2>About Me</h2>
<ul>
<?php
       if ($page=="about")
                {
                ?>
                <li class="selected">BIO</li>
                <?php
                }
       else
                {
                ?>
                <li><a class="navlink" href="?page=about">BIO</a></li>
                <?php
                }

       if ($page=="contact")
                {
                ?>
                <li class="selected">Holla @ Me</li>
                <?php
                }
    else
            {
                ?>
                <li><a class="navlink" href="?page=contact">Holla @ Me</a></li>
                <?php
                }
?>

</ul>

<h2>Works</h2>
<ul>    
<?php

// GET GALLERY NAVIGATION


    $sql = "SELECT GalleryID, Name, Description FROM galleries ORDER BY OrderNumber ASC";
    $result = mysqli_query($connection, $sql);
    while (list ($gal_ID, $gal_name, $gal_desc) = mysqli_fetch_row($result))
        {
                    
        if ($page=="gallery" && $gallery==$gal_ID)
            {
            ?>
                <li class="selected"><?php echo $gal_name ;?></li>
            <?php
            }
        else
            {
                echo "<li>";
                echo "<a class=\"navlink\" href=\"?page=gallery&gallery=";
                echo $gal_ID;
                echo "\">";
                echo $gal_name;
                echo "</a></li>";
  

            }
        
        }

if ($page=="links")
    

?>
</ul>

</div>
</div>


<div id="maincontent">
<div class="wrapper">

<?php

if ($page=="gallery" && $gallery != "")
{
    // ÜBERSCHRIFT LADEN
    

    $sql = "SELECT Name, Description FROM galleries WHERE GalleryID = $gallery";
    $result = mysqli_query($connection, $sql);
    list ($gal_name, $gal_desc) = mysqli_fetch_row($result);
    echo "<p><h1>" . $gal_name . "</h1><br><h2>" . $gal_desc . "</h2></p>";

    
    
    // BILDER LADEN
    
    $sql = "SELECT PictureID, BelongsToGallery, Name, Description, Filename, Filetype, VideoWidth, 
    VideoHeight FROM pictures WHERE BelongsToGallery = $gallery ORDER BY OrderNumber ASC";
    $result = mysqli_query($connection, $sql);
    ?>
    
    <table width="100%" border=0><tr>   
    <?php
    
    // MAIN LOOP

    $i = 0;
    while (list ($picID, $galleryID, $name, $desc, $file, $type, $video_width, $video_height) = 
    mysqli_fetch_row($result))
        {
            
            if ($i==2)
                {
                $i = 0;
                echo "</tr><tr>";
                }
            
            if ($type == "IMG") 
                {
                    echo "<td>";
                    echo "<a href=\"" . "gallery/" . $galleryID . "/" . $file . "\" rel=\"shadowbox[" 
                    . $galleryID . "]\" title=\"" . $name . "\"><img src=\"thumbs/" . $galleryID . 
                    "/" . $file . "\"></a><br>\n" . "<p><strong>" . $name . "</strong></p><p>" . 
                    $desc . "</p></td>";
                }
            if ($type == "MOV") 
                {
                    echo "<td>";

                    echo "<a href=\"" . "gallery/" . $galleryID . "/" . $file . "\" rel=\"shadowbox[" 
                    . $galleryID . "-mov];height=" . $video_height . ";width=" . $video_width . "\" 
                    title=\"" . $name . "\"><img src=\"thumbs/" . $galleryID . "/" . $file . ".jpg\"> 
                    </a><br>\n" . "<p><strong>" . $name . "</strong></p><p>" . $desc . "</p></td>";
                }       
            if ($type == "YOUTUBE")
                {
                    echo "<td>";

                    echo "<a href=\"http://www.youtube.com/v/" . $file . "\" rel=\"shadowbox[" . 
                    $galleryID . "-yt]\" title=\"" . $name . "\"><img src=\"thumbs/" . $galleryID . 
                    "/" . $file . ".jpg\"></a><br>\n" . "<p><strong>" . $name . "</strong></p><p>" . 
                    $desc . "</p></td>";                
                
                }
            
            
            $i++;

        }
    ?>
    </tr></table>       
    <?php
}



MTOM attachment size limit in WebSphere application server

I have a web service with MTOM enabled that receives binary attachments as part of the message payload from the client facing applications. The service is deployed on WebSphere application server. There is no SOAP message handler in place. However, I happen to notice that attachments with greater than 10 MB in size are being dropped by the server or not processed. Basically WebSphere stores the temporary attachments in "IBMTmpCD" folder with *.att filename extension. In the logic when the service attempts to grab the input stream from the Data Handler, the File Not found Exception is thrown. As a result the BLOB does not get created that further causes issues.

My question is that is there a Web Service Proxy settings or any other settings that control the MTOM attachment size limit. I am using MTOM annotation with default values on the service implementation. If a client application sends an attachment of size less than 10 MB then all is well; but when any attachment greater than 10 MB seems like is being blocked by the server or not processed. I have also monitored the SOAP message using TCP/IP monitor, the MTOM attachment message is formed correctly as expected.

Also, if I disable MTOM then attachments greater than 10MB is successfully received and processed by the server.

Environment: Java 7 WebSphere 8.5

Any help on this issue is very much appreciated.




I am encoding Mikrotik Express js Node js and error

app.get('/', (req, res) => {

    

    var listem = ['172.31.1.2', '122.31.2.3']
    listem.forEach(element => {
        var connection = MikroNode.getConnection(element, 'admin', "password..", {
            closeOnDone: false
        });

        var connPromise = connection.getConnectPromise().then(function (conn) {
            var chan1Promise = conn.getCommandPromise('/system/identity/print');
            var chan2Promise = conn.getCommandPromise('/ip/pool/print');
            Promise.all([chan1Promise, chan2Promise]).then(function resolved(values) {
                var val = values[0]
                var vals = values[1]
                console.log('s');
                res.removeHeader('s')
                res.json({ val, vals })


                conn.close();
            }, function rejected(reason) {
                console.log('Oops: ' + reason);
            });
        });
    });
})


CANNOT REMOVE HEADERS AFTER THEY ARE SENT TO THE CL

How can I fix this. How can I export my codes in Promise. Please help me.enter image description here




how can i connect to my laptop(as server) using ip address and port number through mobile

from flask import Flask,jsonify
import cv2
import pytesseract
app = Flask(__name__)
@app.route("/")
def dummy_apii():


return jsonify("Hey folks !")
@app.route("/sp")
def dummy_api():
    img =cv2.imread("./samar.jpg")
    if img is not None:
       return jsonify(2)
    if __name__=="__main__":
    app.run(port=5111)


    now when i run this api this will generate web link as 127.0.0.1:5000
   now i know my laptop's ip address which is somethin 192.168.220.xxx and also know port number 5111 

   So how visit to http://192.168.220.xxx:5111 through mobile 

i want to access this through mobile

i know i might not able to make you clear about question. so if you have experience in networking , working with API please make me call 9760689425

please help me Thankyou...




How to configure reverse proxy via Zuul2?

Could you tell how to configure Zuul2 as reverse proxy without Eureka? For example, if I want all requests which sending to http://localhost will be routes to https://some-app.s3-us-west-2.amazonaws.com ? For example if I open http://localhost/index.html I need to be proxied to https://some-app.s3-us-west-2.amazonaws.com/index.html

I have tried different configurations but got 301 Moved permanently instead proxy pass to target url.




Flutter web app can't comunicate with go http server [closed]

I know it sounds like a beginner's question, but there I go: I've developed a small app to be used locally in restaurantes for the waiters to be able to take orders in their phones. Pretty basic. I also developed a simple go http server to implement the necessary API. It works fine on "mobile" version, both in the emulator and actual devices.

The next step is to port the app so it can be used by the costumers in their phones' browsers. When I changed it to the web version, it worked correctly in Chrome and Edge, at least in terms of UI and navigation. But I am not able to use the API because I get the XMLHTTPError in all requests. I did a little research on the matter, and one of the answers include changing configurations in Chrome, etc., which would be impossible for the costumers to do. Also it seems that a possibility is changing the go server from http to https.

So what I'm asking here is: which is the least complicated way to go? Adding some different code in my app? Changing the server from http to https? Or is other solution available that I haven´t found?

And most important: is it worth the effort, given that current state of flutter web?

Thanks for any help.




Why is my wrapper(div) not being displayed in my page preview?

When I preview my page I expect to see a div(wrapper) centered with a width of 940px surrounding the other elements of the page. Also in my css I made the div(wrapper) have a black background-color. For some reason there is no evidence of this wrapper and there is no obvious error in my html or css.Also my css is connected to my html and all the other elements can be formatted except for my wrapper. Why?

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
<link href="css/styles.css" type="text/css"
    rel="stylesheet">
</head>

<body>
    
  <div id="wrapper">
      
      <header>
      <h1>
      Exotic Honey    
      </h1>
      </header>
      
      <main>
          
     <form action="http://compass.northseattle.edu/~aali/it111/form/formhandler.php" method="post">
         
     <fieldset>
         
        <legend>Place Order</legend> 
         
     <label>Name</label><input type="text" name="name">
         
     <label>Email</label><input type="email" name="email">
         
    <label>Payment</label>
         <ul>
             <li><input type="radio" name="payment" value="mastercard">MasterCard</li>
             <li><input type="radio" name="payment" value="visa">Visa</li>
            <li><input type="radio" name="payment" value="americanexperess">AmericanExpress</li>
         </ul>
         
         <label>Honeys</label>
         <ul>
         <li><input type="checkbox" name="honey" value="pitcairn">Pitcairn</li>
         <li><input type="checkbox" name="honey" value="sage">Sage</li>
        <li><input type="checkbox" name="honey" value="lavendar">Lavendar</li>
         </ul>
         
        <label>Continents</label>
         <select name="regions">
         <option value="na">North America</option>
        <option value="sa">South America</option>
        <option value="eu">Europe</option>
        <option value="as">Asia</option>
        <option value="af">Africa</option>
        <option value="oc">Oceania</option>
         </select>
         
    <input type="submit" value="submit">
     </fieldset>    
     </form>
     </main>
      
      <aside>
      <figure>
         <img class="right" src="images/honeypic.jpg" alt="honey jar">
          <figcaption>Rare exotic honey</figcaption>
      </figure>
      
      </aside>
      
    
    
    <footer>
        <ul>
    <li>Copyright &copy;</li>
        <li><a href="">Terms of use</a></li>
        <li><a href="http://compass.northseattle.edu/~aali/it111/index.html">Web design by Alas</a></li>
        </ul>
    </footer>
      
      </div>

</body>
</html>

Here's my css

<style>

div#wrapper{
        width:940px;
        margin:20px auto;
        background: black;     
    }

  
header{
    color:goldenrod;
    height:auto;
    background-color:purple;
    margin:20px auto;
    text-align:center;
    font-style:italic;
}

footer{
    color:goldenrod;
    height:auto;
    background-color:darkred;
    clear:both;
}

footer ul{
    list-style-type: none;
    margin-left:20px;
}

footer li{
    float:left;
    margin-right:30px;
}
    
    
    
    main{
        background-color:beige;
        float:left;
        width: 500px;
        
    }
    
    aside{
        width:250px;
        float:right;
        margin-right:30px;
        padding-right:30px;
        background-color:darkgray;
        
    }
    
    label{
        display:block;
     }
    
    
    
    input[type=submit]{
        width:auto;
    }
    
    input[type=radio]
    input[type=checkbox]{
        width:auto;
        height:auto;
        margin-right:5px;
        margin-left:5px;
        
    }
    
    form li{
        list-style-type: none;
        margin-left:auto;   
    }
    
    legend{
        font-size:1.3em;
        font-style:italic;
    }
    
    .right{
       width:250px;
        height:250px;
        padding-right:30px;
        margin-right:30px;
    }
   
</style>    

Here's the preview

preview of page




instagram bot TypeError: argument of type 'NoneType' is not iterable

def getTopPosts(self):
    for hashtag in self.hashtags:
        self.browser.get('https://www.instagram.com/explore/tags/'+hashtag+'/')
        time.sleep(5)
        
        links = self.browser.find_elements_by_tag_name('a')
        condition = lambda link: '.com/p/' in link.get_attribute('herf')
        valid_links = list(filter(condition, links))

        for i in range (0,9):
            link = valid_links[i].get_attribute('href')
            if link not in self.links:
                self.links.append(links)

im always getting the TypeError: argument of type 'NoneType' is not iterable error when im running the code above i assume the problem is in the conition variable.

any idea how can i fix it?

my aim is to get the links in a page and then add them to a list.




Recommendations for technology stack to develop a web application with Google maps API and NLP API with a rule based algorithm [closed]

I want to develop a voice-based web application which finds nearby stores according to rule-based classification and retrieve their contact information.

I'm an undergraduate student and struggling to find the most suitable technology stack for development. Please give me your suggestions.




How WSGI application talks to web server?

Python web applications mostly follow WSGI interface. A set of standard rules written to allow python application to talk to web server.

The web server and application internally uses web server protocol to communicate. This can be mod_python/cgi/fastcgi/scgi.

WSGI is Python specific programming interface or an abstraction layer written for Python web applications. So, we can use any web server that have WSGI wrapper/interface to communicate with Python web application. Internally this web server will use one of the CGI/FASTCGI/SCGI web protocol or low level gateways.

Also we have mod_wsgi that will use Apache server specifically but can talk to WSGI application. There are some others too. Like Gunicorn is a WSGI server based on pre-forking model which I think is like a FastCGI protocol.

So web server can either fork ,created a thread, embed the interpretor or follow any other protocol internally to talk to WSGI application.

Is this somewhat the idea?




How to set the port portion for same origin policy?

I know that document.domain sets the domain portion of the same origin policy. How to set the port portion for the same origin policy?

Details

I can use document.domain to set the domain portion. This sets the port portion to null. By default the document inside iframe sets the port portion to 80/443. So the same origin policy fails and the parent JS will not be able to access the iframe content document object. So is there a way to set the port portion of the same origin policy in the parent JS?




Web-Hosting from laptop to internet

I want to host my website from my laptop to the internet. I have done everything I could. I have done the following:

  1. used xampp with port 80
  2. made my system ip static
  3. port forwarding in the router (port 80 to my laptop)
  4. turned on the remote management on router
  5. set apache and mysql private as well as public in firewall

but when I search with my public ip it's not showing my website. Please help me with the solution. I am in need of this.




Not receiving my php form data in my database when I register

I try adding a user registration to my page, but I am having issues getting any response from my database when I submit.

all I want is a system that can receive user data when they register, and I am able to see the data entered when registering on my database. Below are my codes

what am I doing wrong as this is the first time I am trying this.

thanks.

<?php require_once 'controllers/authController.php'; ?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="generator" content="Jekyll v4.0.1">
        <meta http-equip="X-UA-Compatible" content="ie=edge">
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
        <link href="style.css" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
        <title>Love Family Network</title>
    </head>

        <body>
            <div class="navbar">
        
              <img src="logo.jpg" alt="family network" class="hands" width="80" height="80">
              <a class="active" href="index.html"><i class="home"></i> Home</a> 
              <a href="about.html"><i class="ab"></i> About</a> 
              <a href="#"><i class="ca"></i> Contact</a> 
               <a href="#"><i class="Do"></i> Donate</a> 
               <a href="signup.php"><i class="rel"></i>Sign Up</a>
              <a href="login.php"><i class="rel"></i> Login</a>
            </div>
            

              <form method="post" action="signup.php">  
                  <h2 class="text">Sign Up</h2> 

                    <div class="input-group">
                    <label>Username</label>
                    <input type="text" name="username" value="<?php echo $username; ?>" class="form">
                </div>
                <div class="input-group">
                    <label>Email</label>
                    <input type="text" name="email" value="<?php echo $email; ?>">
                </div>
                <div class="input-group">
                    <label>password</label>
                    <input type="password" name="password_1">
                </div>
                <div class="input-group">
                    <label>Confirm password</label>
                    <input type="password" name="password_2">
                </div>
                <div class="input-group">
                    <button type="submit" name="signup" class="btn">Sign Up</button>
                </div>
                <p>
                    Already a member? <a href="login.php">Sign in</a>
                </p>
              </form>
            </body>
            </html>

connection

<?php

session_start();

require 'config/db.php';

$errors = array();
$username = "";
$email = "";


//if user clicks on the sign up button
if(isset($POST['signup'])) {
    $username = $_POST['username'];
    $email = $_POST['email'];
    $password = $_POST['password_1'];
    $passwordConf = $_POST['password_2'];

    //validation
    if(empty($username)) {
        $errors['username'] = "Username required";
    }

    if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {
         $errors['email'] = "Email address is invalid";
    }

    if(empty($email)) {
        $errors['email'] = "Email required";
    }

    if(empty($password)) {
        $errors['password'] = "Password required";
    }

    if ($password !== $passwordConf) {
        $errors['password'] = "The two password do not match";
    }

    $emailQuery = "SELECT * FROM users WHERE email=? LIMIT 1";
    $stmt = $conn->prepare($emailQuery);
    $stmt->bind_param('s', $email);
    $stmt->execute();
    $result =$stmt->get_result();
    $userCount = $result->num_rows;
    $stmt->close();

    if ($userCount > 0) {
        $errors['email'] = "Email already exist";
    }

    if (count($errors) ===0) {
        $password = password_hash($password, PASSWORD_DEFAULT);
        $token = bin2hex(random_bytes(50));
        $verified = false;

        $sql = "INSERT INTO users (username, email, verified, token, password) VALUES (?, ?, ?, ?, ?)";
         $stmt = $conn->prepare($sql);
         $stmt->bind_param('ssbss', $username, $email, $verified, $token, $password);

         if ($stmt->execute()) {
          // login user
          $user_id = $conn->insert_id;
          $_SESSION['id'] = $user_id;
          $_SESSION['username'] = $username;
          $_SESSION['email'] = $email;
          $_SESSION['verified'] = $verified;
          // set flash message
          $_SESSION['message'] = "You are now logged in!";
          $_SESSION['alert'] = "alert-success";
          header('location: homep.php');
          exit();
         } else {
            $errors['db_error'] = "Database error: failed to register";
         }
    }
}



How to reset document.domain to original value?

I have a situation where earlier in the code when the page loads, document.domain was set to a parent domain value (eg - from a.xyz.com to xyz.com).

Due to this I am not able to access the document object inside my iframe (document.getElementById('iframe-tnc').contentDocument.document) whose origin is a.xyz.com. The browser throws cross domain error because it check the current documnet.domain (xyz.com) with the iframe origin (a.xyz.com).

As a solution to this problem, I want to reset the document.domain value to the original value of a.xyz.com. Just doing document.domain=a.xyz.com will not work because the port value stored internal in the browser is reset to null and it is not set back to 80/443. ref - https://stackoverflow.com/a/1525312/1298824

How do I reset the document.domain to the original value including the internal port value? I would want it to be reset to a.xyz.com,80/443.

Note - I do not have access to codebase of iframe src page to set the document.domain value in that page.




How to disable directory listing on Azure BLOB Static Website?

Hi I am hosting a website on Azure BLOB Storage as a static website. When I visit the site and inspect elements, I am able to see all my assets. Is it possible to disable directory listing so it does not show all my files and source codes?

What is happening right now
What I want it to look like




CSS: How to except the "overlay" that seems to be universal to websites? [closed]

I'm trying to do a quick and dirty userstyle edit to make some websites more OLED friendly. When I select * to reduce the brightness of every element slightly then any website turns into a grayish mess:

*{filter: brightness(85%);}

When I only select links, for example, then it works just fine and reduces the brightness of the letters a bit:

* a{filter: brightness(85%);}

How could I select everything except for whatever causes this? Excepting html, body, div, etc. doesn't seem to do it. As I already mentioned, I'm not looking for a perfect dedicated solution, just a simple "universal" blacklist approach to turn all elements a bit less bright.




My "/" requestMapping sent me a WhiteLabel "/" error

I want to simply map my home page with a Spring Controller like this :

package com.douineau.testspringboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/")
public class HomeController {

    @GetMapping
//  @ResponseBody
    public String home() {
        return "index";
    }
}

I also have index.html in src/main/webapp folder. But the application does not recognize the mapping, whereas if comment this all, the app recognizes that it is my home page.

What am I missing?




Can you create multiple landing pages? [closed]

I am trying to create a website with html, css and javascrupt and would like to create multiple landing pages in order to attract visitors. I've looked around, but can't find the answer to how to create them.

Do any of you know how to?




Laravel 8 Class 'Database\Seeders\App\Models\Admin' not found

I'm currently learning on Database Seeding in Laravel 8. When runnning the seed I got an error message

Class 'Database\Seeders\App\Models\Admin' not found

First I created migration database file called Admin.php in App\Models and I put these codes

<?php

namespace App\Models;

use Illuminate\Notification\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
//use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;


class Admin extends Authenticatable
{
    use Notifiable;
    protected $guard = 'admin';
    protected $fillable = [
        'name', 'type','email','password','image','status','created_at','updated_at',
    ];
    protected $hidden = [
        'password', 'remember_token',
    ];
}

After that I created a seeder called AdminsTableSeeder.php and put these codes

<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use DB;

class AdminsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('admins')->delete();
        $adminRecords = [
            [
                'id'=>1, 
                'name'=>'admin', 
                'type'=>'admin',
                'email'=>'admin@admin.com',
                'password'=>'',
                'image'=>'',
                'status'=>1,
            ],
        ];
        foreach ($adminRecords as $key => $record){
            App\Models\Admin::create($record);
        }
    }
}

And finally on DatabaseSeeder.php I put these codes to call AdminsTableSeeder

<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        $this->call(AdminsTableSeeder::class);

    }
}

After I'm done with all of those, I did composer du and trying to run the seed command but I got the error message.

EDIT I already tried to modify the code from

foreach ($adminRecords as $key => $record){
            App\Models\Admin::create($record);
        }

to

foreach ($adminRecords as $key => $record){
            \App\Models\Admin::create($record);
        }

But I stil got the error message like

Seeding: Database\Seeders\AdminsTableSeeder PHP Fatal error: Trait 'Illuminate\Notification\Notifiable' not found in C:\xam pp\htdocs\tobacon_web\app\Models\Admin.php on line 11

Symfony\Component\ErrorHandler\Error\FatalError

Trait 'Illuminate\Notification\Notifiable' not found




Issue regarding of hide and show error message on wrong input

My project written in Angular 10. I have a component that has a simple form with 3 inputs: name, email, phone number.

I need to check the input of the forms for this purpose I use Angular reactive forms.

Here the template (for simplicity I removed email and phone number sections):

  <form [formGroup]="contactForm" (ngSubmit)="onSubmit()" class="myForm">
 
    <div class="contact-container">   
          <div class="field">

            <div class="field">
              <p class="control has-icons-left has-icons-right">
                <input class="input" type="text" placeholder="Full Name" formControlName="name">
                <span class="icon is-small is-left">
                  <i class="fas fa-user"></i>
                </span>
              </p>
              <span *ngIf="(name.dirty || name.touched) && name.invalid && name.errors.required" class="error">
                  *Name is required.
              </span>

              <span *ngIf="(name.dirty || name.touched ) && name.errors.minlength" class="error">
                *Name must be greater than 2 characters. 
                
              </span>
            </div>
            
            <input class="send-button" type="button" [disabled]="!contactForm.valid" [ngClass]="{'notClickable': !contactForm.valid}" value="send">   
     </div>
    </form>

And here is TypeScript for the component:

import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, FormBuilder, Validators } from '@angular/forms';

@Component({
  selector: 'app-contact-form',
  templateUrl: './contact-form.component.html',
  styleUrls: ['./contact-form.component.scss']
})
    export class ContactFormComponent implements OnInit {
      constructor() { 
        this.contactForm = this.createFormGroup();
      }

      get name() {
        return this.contactForm.get('name');
      }
      
      get phone() {
        return this.contactForm.get('phone');
      }
      
      get email() {
        return this.contactForm.get('email');
      }

      contactForm: FormGroup;

      ngOnInit(): void {}

      createFormGroup() {
        return new FormGroup({
          name: new FormControl('',  [Validators.required, Validators.minLength(2)]),
          email: new FormControl('', [Validators.required, Validators.email]),
          phone: new FormControl('', [Validators.required])
        });
      }
      onSubmit() {} 
    }

When I start to print the name and the first character added in the input box the message is showed:

Name must be greater than 2 characters

and that is OK.

But when the second and third characters added the message is not hidden. Because of the Validators.minLength(2) I expect that after the second character is added to the input box the message will be hidden.

Any idea why message does not hide when the second character added to the input box?




samedi 28 novembre 2020

Can somebody write the following statement present in DOM syntax in jquery for me?

hello so this is the code in DOM syntax which i want somebody to write in jquery

document.querySelectorAll("button")[1].style.color="red"

Any kind of help would be appreciated .




Cannot find any way to embedd a Java JAR file or java game onto a website

Im looking to add a game i had created in java to a website. All 8 could find was a Java converter called java2html, but that gasn't been updated since 2008 and I dint hlknow how I would take my hierarchy and put it into a website. The only other way I could find were applets, but I was told those were deprecated. Does anyone have a way to do this, or is a lost cause and I should just rewrite it c++ or something.




here my setinterval function is not working please help me

enter code here
<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
        integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">


<style>
    body {
        width: 50%;
        margin-left: 23%;
    }

    .container {
        border: 2px solid #dedede;
        background-color: #f1f1f1;
        border-radius: 5px;
        padding: 10px;
        margin: 10px 0;
        width: 40%;
        height: 80px;
    }

    /* Darker chat container */
    .darker {
        border-color: #ccc;
        background-color: #ddd;
    }

    /* Clear floats */
    .container::after {
        content: "";
        clear: both;
        display: table;
    }

    /* Style images */
    .container img {
        float: left;
        max-width: 60px;
        width: 100%;
        margin-right: 20px;
        border-radius: 50%;
    }

    /* Style the right image */
    .container img.right {
        float: right;
        margin-left: 20px;
        margin-right: 0;
    }

    /* Style time text */
    .time-right {
        float: right;
        color: #aaa;
    }

    /* Style time text */
    .time-left {
        float: left;
        color: #999;
    }

    .main {
        height: auto;
    }
    </style>
</head>

<body>

<?php

session_start();
$id1 = $_SESSION['id1'];
$id2 = $_SESSION['id2'];


include 'include/connection.php';
echo "id1=" .$id1. "<br>";
echo "id2=" .$id2. "<br>";


$sql="SELECT * FROM `users` WHERE `user_id`='$id1'";
$res = mysqli_query($conn,$sql);
$row = mysqli_fetch_assoc($res);
$self = $row['user_name'];


$sql="SELECT * FROM `users` WHERE `user_id`='$id2'";
$res = mysqli_query($conn,$sql);
$row = mysqli_fetch_assoc($res);
$other = $row['user_name'];

echo "<h3> hello $self you are going to talk with $other </h3>";
mysqli_error($conn);
?>


<script>
    //function Fun
function Fun($id1, $id2)
{
<?php 

include 'include/connection.php';
    
$sql = "SELECT * FROM `message` WHERE (`id1`='$id1' AND `id2`='$id2') OR (`id1`='$id2' AND `id2`='$id1');";
$res=mysqli_query($conn,$sql);

while($row=mysqli_fetch_assoc($res)) 
        {
        $msg=$row['message'];
        $send_id=$row['send_id'];
        echo '<div class="main">';
        
        if($send_id==$id1){
            echo '    
            <div class="container">
            <p>'; echo $msg; ' </p>
            <span class="time-right">11:00</span>
            </div>  ';  
        }
        else{
            echo '<div class="container darker">
            <p>'; echo $msg; echo ' </p>
            <span class="time-left">11:01</span>
            </div>';
        }
        echo '</div>';
        
}
mysqli_error($conn);
$message="";

?>
}
// End function

Fun($id1, $id2);
setInterval(Fun($id1, $id2), 1000);
</script>

    <form method="POST" id="myForm">
        <input type="text" placeholder="Add Message" name="message" />
        <button name="send">send</button>

    </form>
<?php
if(isset($_POST['send'])) { 
    include 'include/connection.php';
    $message = $_POST['message'];
    if($message!=""){
    $sql = "INSERT INTO `message` (`id1`, `id2`, `message`, `stime`, `send_id`) VALUES ('$id1', '$id2', '$message', current_timestamp(), '$id1')";
    $res = mysqli_query($conn,$sql);
    }
    $message="";
}

?>

    <!-- Optional JavaScript; choose one of the two! -->

    <!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
    </script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous">
    </script>

</body>

</html>

here i am trying to make chat web at top there are message that i fetch from database and than after there are input box when i send message than message inserted into database but not show in top message list.

i use here setinterval function but not working.

is there any other way for refresh Fun function after send message.

is there any idea than ask me

Note:

151 line my setinterval function

112 line my Fun function started and

147 line my Fun function ended.




Change the display name of users in a post in facebook

I've seen examples where people have changed the displayed names when they tag fb users. For example "JOhn Doe" might appear as "Johnny Boy". How is this done? Appreciate any help on this. Cheers.




How to apply to google while you have not a degree

I m pleased being in this forum since i m looking to learn programing I have a question and I m looking for answers. I m a marine engineer but i want to be a web devlopper because it is the feild i want to work on I started to learn programing language called HTML my questions are

  1. can i get a job as a developper into strong company like google without having a university degree ?
  2. than if getting a job without college degree is possible , what are the possible ways to do that .
  3. is there free online certafications acceptable for google or any big company ?
  4. I wish you really read this questions and guid me



Bug scroll bar that does not appear

I'm new in HTML/CCS ect... and I have a problem, I put a text and there is no scrollbar that appears, my code is this one, it's when I click on a section that the bug appears: HTML:

  <meta charset="UTF-8">
  
  <title>Bienvenue sur mon site WEB</title>
  
    <link rel="stylesheet" href="style.css" type="text/css" media="screen">
    
  <script>
  window.console = window.console || function(t) {};
</script>

  
  
  <script>
  if (document.location.search.match(/type=embed/gi)) {
    window.parent.postMessage("resize", "*");
  }
</script>

<link rel="shortcut icon" type="image/jpg" href="t.png"/>
</head>

<body>
  <div class="cont">
  <!-- cont inner start -->
  <div class="cont__inner">
    <!-- el start -->
    <div class="el">
      <div class="el__overflow">
        <div class="el__inner">
          <div class="el__bg"></div>
          <div class="el__preview-cont">
            <h2 class="el__heading"><center>Doper sa mémoire<br />grâce à une<br />puce électronique</center></h2>
          </div>
          <div class="el__content">
            <div class="el__text"> 
            <center> <audio src="cerveau.mp3" controls></audio> <br/><br/>
            <div id="col-middle" class="text"><p>C'est un projet très sérieux, dont l'étude a été publiée dans le <em>Journal of neural engineering</em> . Depuis plusieurs années, des expériences sont réalisées dans le laboratoire de Ted Berger à l'université de Californie du Sud. La mise au point de cet implant cérébral est largement financée par le département de recherche de l'armée américaine.</p><p>Pour l'instant, c'est encore au stade du laboratoire, mais les chercheurs viennent de franchir une étape importante. Ils ont équipés des primates avec leur super-puce et les animaux sont devenus des super- champions de la mémoire.</p><h2 class="subheader">L'expérience</h2><p>Au début, les primates s'entraînent à des jeux de mémoire. Un training intense avec des sortes de cartes mémoire visualisées sur un écran d'ordinateur. Ils doivent retrouver des images cachées. Une bonne réponse est récompensée, notamment par une boisson sucrée. Semaine après semaine, les animaux améliorent leurs scores.</p><p>Puis on implante des prothèses dans l'hippocampe des singes. Une zone impliquée dans la formation des souvenirs. L'idée est d'enregistrer et d'analyser l'activité de deux régions de l'hippocampe, et de saisir les informations échangées entre les neurones au moment où, elles communiquent entre elles pour former ou retrouver un souvenir.</p><p>Une fois équipés de leur puce, les singes sont retournés à leurs tests. Les chercheurs se sont aperçus que deux codes apparaissaient sur les enregistrements : un premier code dit "fort" quand les singes se souviennent bien de la figure ou de son emplacement et réussissaient l'exercice et un code dit faible lorsque la mémoire leur fait défaut.</p><h2 class="subheader">L'utilisation des résultats</h2><p>Les chercheurs ont utilisés les résultats pour améliorer les scores obtenus par les singes aux épreuves de mémoire en programmant les puces électroniques ! Systématiquement, elles ont envoyé le code fort lorsque l'animal était sur le point de faire une erreur. Autrement dit : la puce a donc agi comme une sorte de correcteur de mémoire en temps réel.</p><h2 class="subheader">Une expérience déjà menée</h2><p>En 2011, des tests avaient déjà été effectués par Ted Berger et son équipe sur des rats. Les chercheurs s'étaient servis de leurs puces électroniques pour en faire des interrupteurs de la mémoire.</p><p>Lorsque la puce était éteinte, les nouveaux souvenirs ne se formaient plus, mais quand elle était allumée, la mémoire pouvait de nouveau s'enrichir de nouvelles expériences. Les rats équipés montraient de meilleurs scores aux tests de mémorisation par rapport à leurs congénères non équipés. On imagine le potentiel de telles prothèses cérébrales pour des personnes souffrant de lésions cérébrales ou même de maladies dégénératives.</p>
            </div>
            </center>
            </div>
            <div class="el__close-btn"></div>
          </div>
        </div>
      </div>
      <div class="el__index">
        <div class="el__index-back">1</div>
        <div class="el__index-front">
          <div class="el__index-overlay" data-index="1">1</div>
        </div>
      </div>
    </div>
    <!-- el end -->
    <!-- el start -->
    <div class="el">
      <div class="el__overflow">
        <div class="el__inner">
          <div class="el__bg"></div>
          <div class="el__preview-cont">
            <h2 class="el__heading"><center>Le clonage animal :<br />entre mythes<br />et réalités</center> </h2>
          </div>
          <div class="el__content">
            <div class="el__text">Whatever</div>
            <div class="el__close-btn"></div>
          </div>
        </div>
      </div>
      <div class="el__index">
        <div class="el__index-back">2</div>
        <div class="el__index-front">
          <div class="el__index-overlay" data-index="2">2</div>
        </div>
      </div>
    </div>
    <!-- el end -->
    <!-- el start -->
    <div class="el">
      <div class="el__overflow">
        <div class="el__inner">
          <div class="el__bg"></div>
          <div class="el__preview-cont">
            <h2 class="el__heading"><center>Génétique :<br />la Chine va <br />recréer la licorne !</center> </h2>
          </div>
          <div class="el__content">
            <div class="el__text">Whatever</div>
            <div class="el__close-btn"></div>
          </div>
        </div>
      </div>
      <div class="el__index">
        <div class="el__index-back">3</div>
        <div class="el__index-front">
          <div class="el__index-overlay" data-index="3">3</div>
        </div>
      </div>
    </div>
    <!-- el end -->
  </div>
  <!-- cont inner end -->
</div>


      <script id="rendered-js">
var $cont = document.querySelector('.cont');
var $elsArr = [].slice.call(document.querySelectorAll('.el'));
var $closeBtnsArr = [].slice.call(document.querySelectorAll('.el__close-btn'));

setTimeout(function () {
  $cont.classList.remove('s--inactive');
}, 200);

$elsArr.forEach(function ($el) {
  $el.addEventListener('click', function () {
    if (this.classList.contains('s--active')) return;
    $cont.classList.add('s--el-active');
    this.classList.add('s--active');
  });
});

$closeBtnsArr.forEach(function ($btn) {
  $btn.addEventListener('click', function (e) {
    e.stopPropagation();
    $cont.classList.remove('s--el-active');
    document.querySelector('.el.s--active').classList.remove('s--active');
  });
});
//# sourceURL=pen.js
    </script>
</body>
</html>

CSS:

*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
    
  text-align: center;
  background: #1f1f1f;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

.cont {
  position: relative;
  overflow: hidden;
  height: 100vh;
  padding: 80px 70px;
}
.cont__inner {
  position: relative;
  height: 100%;
}
.cont__inner:hover .el__bg:after {
  opacity: 1;
}

.el {
  position: absolute;
  left: 0;
  top: 0;
  width: 32%;
  height: 100%;
  background: #252525;
  -webkit-transition: width 0.7s, opacity 0.6s 0.7s, z-index 0s 1.3s, -webkit-transform 0.6s 0.7s;
  transition: width 0.7s, opacity 0.6s 0.7s, z-index 0s 1.3s, -webkit-transform 0.6s 0.7s;
  transition: transform 0.6s 0.7s, width 0.7s, opacity 0.6s 0.7s, z-index 0s 1.3s;
  transition: transform 0.6s 0.7s, width 0.7s, opacity 0.6s 0.7s, z-index 0s 1.3s, -webkit-transform 0.6s 0.7s;
  will-change: transform, width, opacity;
}
.el:not(.s--active) {
  cursor: pointer;
}
.el__overflow {
  overflow: hidden;
  position: relative;
  height: 100%;
}
.el__inner {
  overflow: hidden;
  position: relative;
  height: 100%;
  -webkit-transition: -webkit-transform 1s;
  transition: -webkit-transform 1s;
  transition: transform 1s;
  transition: transform 1s, -webkit-transform 1s;
}
.cont.s--inactive .el__inner {
  -webkit-transform: translate3d(0, 100%, 0);
          transform: translate3d(0, 100%, 0);
}
.el__bg {
  position: relative;
  width: calc(100vw - 140px);
  height: 100%;
  -webkit-transition: -webkit-transform 0.6s 0.7s;
  transition: -webkit-transform 0.6s 0.7s;
  transition: transform 0.6s 0.7s;
  transition: transform 0.6s 0.7s, -webkit-transform 0.6s 0.7s;
  will-change: transform;
}
.el__bg:before {
  content: "";
  position: absolute;
  left: 0;
  top: -5%;
  width: 100%;
  height: 110%;
  background-size: cover;
  background-position: center center;
  -webkit-transition: -webkit-transform 1s;
  transition: -webkit-transform 1s;
  transition: transform 1s;
  transition: transform 1s, -webkit-transform 1s;
  -webkit-transform: translate3d(0, 0, 0) scale(1);
          transform: translate3d(0, 0, 0) scale(1);
}
.cont.s--inactive .el__bg:before {
  -webkit-transform: translate3d(0, -100%, 0) scale(1.2);
          transform: translate3d(0, -100%, 0) scale(1.2);
}
.el.s--active .el__bg:before {
  -webkit-transition: -webkit-transform 0.8s;
  transition: -webkit-transform 0.8s;
  transition: transform 0.8s;
  transition: transform 0.8s, -webkit-transform 0.8s;
}
.el__bg:after {
  content: "";
  z-index: 1;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
}
.cont.s--el-active .el__bg:after {
  -webkit-transition: opacity 0.5s 1.4s;
  transition: opacity 0.5s 1.4s;
  opacity: 1 !important;
}
.el__preview-cont {
  z-index: 2;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  -webkit-transition: all 0.3s 1.2s;
  transition: all 0.3s 1.2s;
}
.cont.s--inactive .el__preview-cont {
  opacity: 0;
  -webkit-transform: translateY(10px);
          transform: translateY(10px);
}
.cont.s--el-active .el__preview-cont {
  opacity: 0;
  -webkit-transform: translateY(30px);
          transform: translateY(30px);
  -webkit-transition: all 0.5s;
  transition: all 0.5s;
}
.el__heading {
  color: #fff;
  text-transform: uppercase;
  font-size: 18px;
}
.el__content {
  z-index: -1;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: all 0.1s;
  transition: all 0.1s;
}
.el.s--active .el__content {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  -webkit-transition: all 0.5s 1.4s;
  transition: all 0.5s 1.4s;
}
.el__text {
  text-transform: uppercase;
  font-size: 40px;
  color: #fff;
}
.el__close-btn {
  z-index: -1;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 60px;
  height: 60px;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: all 0s 0.45s;
  transition: all 0s 0.45s;
  cursor: pointer;
}
.el.s--active .el__close-btn {
  z-index: 5;
  opacity: 1;
  pointer-events: auto;
  -webkit-transition: all 0s 1.4s;
  transition: all 0s 1.4s;
}
.el__close-btn:before, .el__close-btn:after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 8px;
  margin-top: -4px;
  background: #fff;
  opacity: 0;
  -webkit-transition: opacity 0s;
  transition: opacity 0s;
}
.el.s--active .el__close-btn:before, .el.s--active .el__close-btn:after {
  opacity: 1;
}
.el__close-btn:before {
  -webkit-transform: rotate(45deg) translateX(100%);
          transform: rotate(45deg) translateX(100%);
}
.el.s--active .el__close-btn:before {
  -webkit-transition: all 0.3s 1.4s cubic-bezier(0.72, 0.09, 0.32, 1.57);
  transition: all 0.3s 1.4s cubic-bezier(0.72, 0.09, 0.32, 1.57);
  -webkit-transform: rotate(45deg) translateX(0);
          transform: rotate(45deg) translateX(0);
}
.el__close-btn:after {
  -webkit-transform: rotate(-45deg) translateX(100%);
          transform: rotate(-45deg) translateX(100%);
}
.el.s--active .el__close-btn:after {
  -webkit-transition: all 0.3s 1.55s cubic-bezier(0.72, 0.09, 0.32, 1.57);
  transition: all 0.3s 1.55s cubic-bezier(0.72, 0.09, 0.32, 1.57);
  -webkit-transform: rotate(-45deg) translateX(0);
          transform: rotate(-45deg) translateX(0);
}
.el__index {
  overflow: hidden;
  position: absolute;
  left: 0;
  bottom: -80px;
  width: 100%;
  height: 100%;
  min-height: 250px;
  text-align: center;
  font-size: 20vw;
  line-height: 0.85;
  font-weight: bold;
  -webkit-transition: opacity 0.3s 1.4s, -webkit-transform 0.5s;
  transition: opacity 0.3s 1.4s, -webkit-transform 0.5s;
  transition: transform 0.5s, opacity 0.3s 1.4s;
  transition: transform 0.5s, opacity 0.3s 1.4s, -webkit-transform 0.5s;
  -webkit-transform: translate3d(0, 1vw, 0);
          transform: translate3d(0, 1vw, 0);
}
.el:hover .el__index {
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}
.cont.s--el-active .el__index {
  -webkit-transition: opacity 0.3s, -webkit-transform 0.5s;
  transition: opacity 0.3s, -webkit-transform 0.5s;
  transition: transform 0.5s, opacity 0.3s;
  transition: transform 0.5s, opacity 0.3s, -webkit-transform 0.5s;
  opacity: 0;
}
.el__index-back, .el__index-front {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
}
.el__index-back {
  color: #2f3840;
  opacity: 0;
  -webkit-transition: opacity 0.25s 0.25s;
  transition: opacity 0.25s 0.25s;
}
.el:hover .el__index-back {
  -webkit-transition: opacity 0.25s;
  transition: opacity 0.25s;
  opacity: 1;
}
.el__index-overlay {
  overflow: hidden;
  position: relative;
  -webkit-transform: translate3d(0, 100%, 0);
          transform: translate3d(0, 100%, 0);
  -webkit-transition: -webkit-transform 0.5s 0.1s;
  transition: -webkit-transform 0.5s 0.1s;
  transition: transform 0.5s 0.1s;
  transition: transform 0.5s 0.1s, -webkit-transform 0.5s 0.1s;
  color: transparent;
}
.el__index-overlay:before { 
  content: attr(data-index);
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  -webkit-transform: translate3d(0, -100%, 0);
          transform: translate3d(0, -100%, 0);
  -webkit-transition: -webkit-transform 0.5s 0.1s;
  transition: -webkit-transform 0.5s 0.1s;
  transition: transform 0.5s 0.1s;
  transition: transform 0.5s 0.1s, -webkit-transform 0.5s 0.1s;
}
.el:hover .el__index-overlay {
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}
.el:hover .el__index-overlay:before {
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}
.el:nth-child(1) {
  -webkit-transform: translate3d(0%, 0, 0);
          transform: translate3d(0%, 0, 0);
  -webkit-transform-origin: 50% 50%;
          transform-origin: 50% 50%;
}
.cont.s--el-active .el:nth-child(1):not(.s--active) {
  -webkit-transform: scale(0.5) translate3d(0%, 0, 0);
          transform: scale(0.5) translate3d(0%, 0, 0);
  opacity: 0;
  -webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: transform 0.95s, opacity 0.95s;
  transition: transform 0.95s, opacity 0.95s, -webkit-transform 0.95s;
}
.el:nth-child(1) .el__inner {
  -webkit-transition-delay: 0s;
          transition-delay: 0s;
}
.el:nth-child(1) .el__bg {
  -webkit-transform: translate3d(-34%, 0, 0);
          transform: translate3d(-34%, 0, 0);
}
.el:nth-child(1) .el__bg:before {
  -webkit-transition-delay: 0s;
          transition-delay: 0s;
  background-image: url("https://cdn.discordapp.com/attachments/562671211369332752/782006113494630521/cerveau.jpg");
}
.el:nth-child(2) {
  -webkit-transform: translate3d(105.2083333333%, 0, 0);
          transform: translate3d(105.2083333333%, 0, 0);
  -webkit-transform-origin: 155.2083333333% 50%;
          transform-origin: 155.2083333333% 50%;
}
.cont.s--el-active .el:nth-child(2):not(.s--active) {
  -webkit-transform: scale(0.5) translate3d(105.2083333333%, 0, 0);
          transform: scale(0.5) translate3d(105.2083333333%, 0, 0);
  opacity: 0;
  -webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: transform 0.95s, opacity 0.95s;
  transition: transform 0.95s, opacity 0.95s, -webkit-transform 0.95s;
}
.el:nth-child(2) .el__inner {
  -webkit-transition-delay: 0.1s;
          transition-delay: 0.1s;
}
.el:nth-child(2) .el__bg {
  -webkit-transform: translate3d(-19.2%, 0, 0);
          transform: translate3d(-19.2%, 0, 0);
}
.el:nth-child(2) .el__bg:before {
  -webkit-transition-delay: 0.1s;
          transition-delay: 0.1s;
  background-image: url("https://cdn.discordapp.com/attachments/562671211369332752/782006110776328192/clone.jpg");
}
.el:nth-child(3) {
  -webkit-transform: translate3d(210.4166666667%, 0, 0);
          transform: translate3d(210.4166666667%, 0, 0);
  -webkit-transform-origin: 260.4166666667% 50%;
          transform-origin: 260.4166666667% 50%;
}
.cont.s--el-active .el:nth-child(3):not(.s--active) {
  -webkit-transform: scale(0.5==) translate3d(210.4166666667%, 0, 0);
          transform: scale(0.5) translate3d(210.4166666667%, 0, 0);
  opacity: 0;
  -webkit-transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: opacity 0.95s, -webkit-transform 0.95s;
  transition: transform 0.95s, opacity 0.95s;
  transition: transform 0.95s, opacity 0.95s, -webkit-transform 0.95s;
}
.el:nth-child(3) .el__inner {
  -webkit-transition-delay: 0.2s;
          transition-delay: 0.2s;
}
.el:nth-child(3) .el__bg {
  -webkit-transform: translate3d(-30%, 0, 0);
          transform: translate3d(-30%, 0, 0);
}
.el:nth-child(3) .el__bg:before {
  -webkit-transition-delay: 0.2s;
          transition-delay: 0.2s;
  background-image: url("https://cdn.discordapp.com/attachments/562671211369332752/782005633430978580/licorne.jpg");
}
.el:hover .el__bg:after {
  opacity: 0;
}
.el.s--active {
  z-index: 1;
  width: 100%;
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
  -webkit-transition: width 0.7s 0.7s, z-index 0s, -webkit-transform 0.6s;
  transition: width 0.7s 0.7s, z-index 0s, -webkit-transform 0.6s;
  transition: transform 0.6s, width 0.7s 0.7s, z-index 0s;
  transition: transform 0.6s, width 0.7s 0.7s, z-index 0s, -webkit-transform 0.6s;
}
.el.s--active .el__bg {
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
  -webkit-transition: -webkit-transform 0.6s;
  transition: -webkit-transform 0.6s;
  transition: transform 0.6s;
  transition: transform 0.6s, -webkit-transform 0.6s;
}
.el.s--active .el__bg:before {
  -webkit-transition-delay: 0.6s;
          transition-delay: 0.6s;
  -webkit-transform: scale(1.1);
          transform: scale(1.1);
}

(I have to zoom out to see the whole text)

(I would like to be able to scroll the text without the image moving)

(I'm testing a big text)




Full feature Linux scheduler

In Linux the scheduler cron processes outputs of programs only sending them via mails or writing them in files. So these outputs can't be assigned for example to a PHP variable (see this StackOverflow question).

Is there another scheduler which permits to fully run PHP web applications ?




How to create automation for webpage after completion of one video, play next video?

There are lot websites from where I study for coding. But after one video ends, next video there is no auto-play functionality implemented. Is there any extension or batch file which can trigger play after completion of one video. I am new to coding, please help.




play random video from a youtube playlist in Javascript [closed]

I am trying to create Javascript program that will play a random youtube video from a playlist every time you reload the page, can anyone help me with this?

Please and thank you




My goal is it to build a bot, but I am struggeling with the adding to cart process. Why does it not work?

I would like to build software to automatically checkout any product on https://www.mueller.de/. With the script, I have the response I get is 403. Why is this the case? I do not know what went wrong. Can somebody help me? This is the product I want to buy https://www.mueller.de/p/pokemon-sammelkartenspiel-pokemon-tin-88-pikachu-v-2658524/ . Basically, the first step I want to solve is that I can add the product to my cart by using request. Is it because of missing cookies?

import requests

headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"}

post_data = {"categoryId": "15249460","delivery": "delivery_market","itemId": "2658524","productId": "2658524","quantity": "1","_csrf": "c60af17b-4a19-4d0d-a4b4-1237b36ca3b7"}

url = "https://www.mueller.de/basket/cc/add/"

add_to_cart = requests.post(url, headers=headers, data=post_data)

print (add_to_cart)



Record voice that played in modern browser

How can I record voice in web that can be recorder and played in all modern browser, including chrome and safari in both desktop and mobile




Offline website builder with option to add html code in buttons

I want to create a simple website that will have only buttons. These buttons should have hmtl code (copy a message to clipboard on click). So, i'm looking for a free offline website builder that allows me to create buttons including html code when i click them. Instead of just move me to an another page, i want a builder that let me program the buttons so they can copy a message to clipboard or other html coding stuff




Make a browser(webapp) act like a virtual camera

I want to make a webapp that takes input from you camera, changes it, and then outputs the resulting video as a virtual camera input that you can use on windows 10.

Is this possible? I recently saw this being used on obs virtual camera, and I want to use it on a webapp that I am currently developing




I want to build a bot that automatically buys any product on a specific website. How do I do this?

I would like to build software to automatically checkout any product on https://www.mueller.de/. With the script I have so far the response I get is 403. Why is this the case? I do not know what went wrong. Can somebody help me? This is the product I want to buy https://www.mueller.de/p/pokemon-sammelkartenspiel-pokemon-tin-88-pikachu-v-2658524/ .


headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"}

post_data = {"categoryId": "15249460","delivery": "delivery_market","itemId": "2658524","productId": "2658524","quantity": "1","_csrf": "c60af17b-4a19-4d0d-a4b4-1237b36ca3b7"}

url = "https://www.mueller.de/basket/cc/add/"

add_to_cart = requests.post(url, headers=headers, data=post_data)

print (add_to_cart)```





Display Quantity on Orders-Received and Customer Orders Details Page

I want to display Quantity on Orders-Received and Customer Orders Details Page. I had a code snippet which helped me display the same on order-checkout page, but I am a noob and don't know how to replicate the same on Orders-received and Customer Order details page. I used the following for checkout page.

add_filter( 'woocommerce_checkout_cart_item_quantity', 'customizing_checkout_item_quantity', 10, 3);
function customizing_checkout_item_quantity( $quantity_html, $cart_item, $cart_item_key ) {
    $quantity_html = ' <br>
            <span class="product-quantity">' . __('Quantity:') . ' <strong>' . $cart_item['quantity'] . '</strong></span>';

    return $quantity_html;
}



Speech Recognition program is not giving me proper output in python [ IDE:PyCharm ]

MY CODE :

import webbrowser as wb
import speech_recognition as sr

r = sr.Recognizer()
with sr.Microphone() as source:
    print("speak now")
    audio = r.listen(source)
    text = r.recognize_google(audio)
    try:
        if "youtube" in text:
           wb.open_new("www.youtube.com")
    except sr.UnknownValueError:
        print("error")
    except sr.RequestError as e:
        print("failed".format(e))

MY OUTPUT : speak now

Process finished with exit code 0

My code isn't opening web browser at all . can anyone fix it?




Scraping or API For New Job Portal/Website?

Hope you are well.

I am looking at creating a job site with only remote jobs.

Is there a best practice in order to populate the site with jobs? Is it best to use scraping or should I use other site's API's?

Many Thanks




Where is my server substituting for a ### string?

I'm trying to move a PHP based website to a new ISP for a friend as the original developers have lost all of their PHP capability (and I'm really an Oracle programmer).

I've got a Dev environment set up on my home system using LAMP which is almost serving everything properly. I'm trying to emulate the prod environment, so have set the website up under its own directory on the server (not the base Apache directory), have set it up with its own example.com.conf file, and have simulated example.com in my /etc/hosts files on dev server and test client.

One of the templates that is included includes the line : <base href="### WEB_ROOT ###" />

Which is coming out of the original web server as : <base href="https://example.com/" />

Unfortunately it is coming out of my development server as : <base href="https://localhost/" /> Which means that none of the relative paths are working.

There are also other lines that use the same notation for TITLE, META DESCRIPTION and others.

I've tried searching for PHP, HTML and Apache substitution strings, but I can't find anything about this '###' notation.

I don't even know where in the stack this substitution is happening, so if someone can please point me at some documentation about it, and especially where I need to set the WEB_ROOT etc. variables, that would be wonderful.

Thanks