lundi 30 septembre 2019

how to modify value inside html tags by class name

please help, so i given this string <p><span class='math-tex'>\\( x&gt;0,y&gt;0 \\)</span></p>

and i want to modify the inside value, so it would render with math jax

to be come like this <p><span class='math-tex'>$$\\( x&gt;0,y&gt;0 \\)$$</span></p>

there are $$ wrapping the value.

i am clueless how to use math jax properly, i think this is the best way to solve from my previous thread -> (How to use math jax?)

but i have no idea how modify the those value when the window load on start




How to prevent chrome media keys from keyboard and headset to play or pause audio on a website

I have a couple of audio HTML5 elements on my website and apparently Chrome decided to cover the usage of media keys in a recent update. My audio sometime plays by itself when I press the play key of my keyboard, while it should only play on certains events (notification ringing).

I would like to prevent those media keys to start and stop my audio elements if that's possible.




how to get perfectly data from google-api

I am trying to get data from google places API ( written on JSON ). Each result has a single page with the most 20 results. if there are more results you will have var called Next_token. Next token is a link to the next page with the results. if there isn't so it's not declared. I tried to make so stuff with no 100% success.

I am a bit new with the ES5/6 on JS. So I tried to fetch the first page and after that looping until there aren't more results. I the code I cut all that doesn't matter.

function getdatafirsttry(url)
{
    fetch(url,{method: 'get'})
    .then(response =>
        response.json())
    .then(data => {
    next_token = data.next_page_token;

    if(next_token !== undefined){
    url='https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.0333332,34.7666636&radius=1500&type=restaurant&key=AIzaSyCbaehPkHsIMdyfCjDRdfMlZHSVrl12E_A&fields=opening_hours,photos,rating.json&pagetoken='+next_token;
    toContinue = true;
    }
    else{toContinue=false}



    }

//Next page token
function alltogheter(url)
{

    getdatafirsttry(url);

}
getdatafirsttry(url);



How to insert two action at one button OnPress - delete widget and create it by new?

At the picture i tried to display:

  • 1-1 - how looks error.
  • 2-2 - how I solved it.

    But it only works by pressing both button (at first DELETE and then RANDOM)

It will be better to make only one action, but I havent done it.

in short

and i trying to insert code to delete widget and create it by new at one button action. But its not working. I cannt understand why and how to make it work?

code: https://github.com/develop86229/editTextControl

          FlatButton(
           child: Text("RANDOM"),
                onPressed: () {
                  setState(() {
                    textWidget = Container();
                    textWidget = Form(
                        key: _textKey,
                        child: TextFormField(
                          controller: myTextController,
                        ));
                   myTextController.text = rnd.nextInt(1000000000).toString();
                  });

 @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            textWidget,
            FlatButton(
                child: Text("RANDOM"),
                onPressed: () {
                  setState(() {
                    textWidget = Container();
                    textWidget = Form(
                        key: _textKey,
                        child: TextFormField(
                          controller: myTextController,
                        ));
                  });
                  myTextController.text = rnd.nextInt(1000000000).toString();
                }),
            FlatButton(
                child: Text("DELETE"),
                onPressed: () {
                  setState(() {
                    textWidget = Container();
                  });
                }),
          ],
        ),
      ),
    );



How to undo all package installation from NPM Audit Fix

I used npm audit fix accidentally it updates all the package version. I want the package not to be updated and get it back to the first time i install the package version.

npm audit fix

any conclusion?




Can someone find out .js file if its not in use by site?

Lets say i store file.js in my public_html, the script is never used in any of inner pages, is there any way someone could find out that this file exists in that folder?




Using NNI inside of Google Colaboratory

I am trying to use nni (https://github.com/microsoft/nni), a hyperparameter search library, inside of Google colaboratory. This library creates a Web UI to dynamically view the progress of the hyperameter search. The problem is that I can't access this web UI from google colab. Since the experiment isn't started on my local machine but on the google colab server, I know that I can't access it with on the usual "http://127.0.0.1" address; I have thus obtained the IP address of the notebook using Colaboratory virtual instances IP range?, but it still doesn't work ("this site can't be reached").

Has anyone used nni with google colab or has already viewed a web page that is run from a google colab notebook ? I don't know where to start so any hint would be great!

I can give additional details if needed.

Thanks for the help!




NoUniqueBeanDefinitionException while wiring up InternalResourceViewResolver

I'm currently trying to get integration tests running in our Spring MVC project. One of our components depends on the ViewResolver which gets autowired by Spring. It's configured in the test-context.xml:

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
    <property name="prefix" value="/WEB-INF/views/" />
    <property name="suffix" value=".jsp" />
</bean>

However, this gives me an NoUniqueBeanDefinitionException:

Caused by:
org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.web.servlet.ViewResolver' available: expected single matching bean but found 2: org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#1

When I remove the InternalResourceViewResolver property from the test-context.xml, I get a

Caused by:               
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.web.servlet.ViewResolver' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

How can that happen?

Any help would be greatly appreciated.




Does a non-self-signed certificate, imported into root store, require a (self-signed) issuer to also be imported into the root store?

Does a non-self-signed certificate, imported into root store, require a (self-signed) issuer to also be imported into the root store?

Suppose I've a certificate A that is signed by another certificate B. Is it then sufficient to only import A into the root store, i.e. certificate validation stops at A, or should B also be imported into the root store for proper certificate validation?

The reason I'm asking this question, is that I've encountered different results with different products (e.g. web browser or system), and so I want to know the right way.




text is appearing below the links

Hi i am trying to create a blog website and i have problem that i divided page section in 3 parts i want 1,3 part section height should be equal to 2part(content part) height how to do that i tried many times but not happening

attaching screenshot of output i highlighted the part that where i don't want text.

i know solution by bootstrap and js but i want from html/css

screenshot of output




Assign Src To Images Dynamically In Angular

I try to upload file in Angular. I added a button that calls the post a method that writes an image to a database and saves it to a folder "assets". This image must show up in . This file is successfully post and stored on assets but it doesn`t shows up and i get error

But after i reload Angular CLI server it already works.

My input

<div class="form-group">
        <label for="inputPhotoGame">Select a game photo</label>
        <input type="file" class="form-control-file" id="inputPhotoGame" (change)="fileProgress($event)">
      </div>

My img

<img alt="photo" [src]=game.img_game>'''

Component class
'''import { Component, OnInit } from '@angular/core';

import {Genre} from '../../models/Genre';
import {MatIconRegistry} from '@angular/material';
import {CustomIconService} from '../../services/CustomIconService';
import {Game} from '../../models/Game';
import {FormComponent} from '../form/form.component';
import {GameService} from '../../services/GameService';

@Component({
  selector: 'app-add-game',
  templateUrl: './add-game.component.html',
  styleUrls: ['./add-game.component.scss']
})
export class AddGameComponent implements OnInit {

  genresList: Genre [];
  searchStringForFiltrSearchArcade: string = '';
  selectedPlatformIcon: string = '';
  fileToUpload: File = null;
  game: Game = new Game();
  previewUrl:any = null;

  constructor(private customIconService: CustomIconService, private gameService: GameService) {
    this.customIconService.init();
    this.genresList = [{name: 'Arcada'}, {name: 'Sport Simulator'}, {name: 'MOBA'}, {name: 'MMO RPG'}, {name: 'RPG'}, {name: 'Shuter'}];
  }

  ngOnInit() {
  }

  changePlatform() {
    switch (this.game.platform_game) {
      case 'Xbox': {
        this.selectedPlatformIcon = 'icon-xbox';
        break;
      }
      case 'PlayStation': {
        this.selectedPlatformIcon = 'icon-ps';
        break;
      }
      case 'PC': {
        this.selectedPlatformIcon = 'icon-pc';
        break;
      }
      default: alert("Error");
    }
  }

  handleFileInput(fileInput: any){
    // this.fileToUpload = files.item(0);
    // console.log(this.fileToUpload);
    // this.gameService.postFile(this.fileToUpload,"16");
    // alert("file upload")
  }

  fileProgress(fileInput: any) {
    this.fileToUpload = <File>fileInput.target.files[0];
    this.preview();
  }

  preview() {
    let mimeType = this.fileToUpload.type;
    if (mimeType.match(/image\/*/) == null) {
      return;
    }
    let reader = new FileReader();
    reader.readAsDataURL(this.fileToUpload);
    reader.onload = (_event) => {
      this.previewUrl = reader.result;
    };
    this.gameService.postFile(this.fileToUpload,"16");
  }
}

Service class

import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {Game} from "../models/Game";

@Injectable()
export class GameService {

  private readonly usersUrl: string;

  constructor(private httpClient: HttpClient) {
    this.usersUrl = 'http://localhost:8080/api/v1/all';
  }

  public find(): Observable<Game[]> {

    return this.httpClient.get<Game[]>(this.usersUrl);
  }

  postFile(fileToUpload: File, idGame: string) {
    const endpoint = 'http://localhost:8080/api/v1/uploadFile/'+idGame;
    const formData: FormData = new FormData();
    formData.append('file', fileToUpload, fileToUpload.name);
    this.httpClient
      .post(endpoint, formData, { headers: {"cache-control": "no-cache"} }).subscribe((val) => {
        console.log(val);
      });
    return false;
  }
}

And html page error

After reload Angular CLI server




Downloading a web page embedded 3D file

I am currently trying to download a 3d file from the following webpage. https://infographics.channelnewsasia.com/jewel-changi-airport/index.html The file is down there here and it is interactive. However, when I tried to inspect the source, I can only see it as a "canvas" without the 3D file. Is there a way I can do to download this file in format let's .obj? Or is the file stored else where? Thank you!




Fatal error: Uncaught Error: Call to undefined function mysqli_connect_erno() [duplicate]

This question already has an answer here:

I am a noob at web development, so please forgive the noobie question. I know that there is an issue with line 5, but I don't know why the function isn't found. I am pretty sure I typed it correctly. Exactly what is causing this error?

ERROR

Fatal error: Uncaught Error: Call to undefined function mysqli_connect_erno() in /opt/lampp/htdocs/demo/index.php:5 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/demo/index.php on line 5

CODE


<?php
$con = mysqli_connect("localhost", "root", "", "social");

if(mysqli_connect_erno()) {
    echo "Failed to connect: " . mysqli_connect_erno();
}

?>


<html>
<head>
    <title></title>
</head>
<body>
Hello Dude!!!
</body>
</html>

FILE STRUCTURE enter image description here




Issue: TMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs

I received an alert from IOS Apple Store. But I never used UIWebView code. My flutter version is "Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17763.737], locale en-US)".

And My pubspec.yaml code is...

  cupertino_icons: ^0.1.2
  firebase_core: ^0.4.0+8
  firebase_ml_vision: ^0.6.0
  shared_preferences: ^0.5.3+4
  camera: ^0.4.2
  http: ^0.12.0+2
  flutter_launcher_icons: ^0.7.2+1
  html: ^0.14.0+2
  url_launcher: ^5.1.3
  fluttertoast: ^3.1.3
  font_awesome_flutter: ^8.5.0
  vibration: 1.2.1

Please help me. How can fix it? Let me know what I miss. Thanks and Regards.




dimanche 29 septembre 2019

JQuery Element Found but it's not clickable

Very strange... This page is something protected or anything i don't know? I tried to click Next page anchor.

enter image description here

See this page first.

I tried to grab the element using this

var buttonNext = $('a.next-page');

if(buttonNext.length > 0){
    console.log('found!');

    // but when clicking
    $(buttonNext).click();

    // or even no effect at all
    $(buttonNext).trigger('click');
}



Display full domain information in cURL

I wrote a project where I want to display domain info. In my project, it displays information like this. But this is not correct, I want him to display full information enter image description here

He takes information about domains from the database. I kind of wrote code, but it doesn't display information like this enter image description here

My code

import java.sql.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

@Data
@AllArgsConstructor
@ToString
public class TemporaryModel {

  Long id;
  Long oid;
  String name;
  Long tld;
  String registrant;
  String c_admin;
  String c_tech;
  String c_bill;
  Date expired;
}

WhoisResponse

@Data
public class WhoisResponse {

  private DomainInfo info;
  private Agent agent;
  private List<NameServerInfo> nameServerInfos;

  public WhoisResponse(DomainInfo info, Agent agent, List<NameServerInfo> nameServerInfos) {
    this.info = info;
    this.agent = agent;
    this.nameServerInfos = nameServerInfos;
  }
}

Agent

@Data
public class Agent {

  String NIC;
  String name;
  String phone;
  String fax;
  String email;
}

DomainInfo

@Data
@AllArgsConstructor
public class DomainInfo {

  String domainName;
  String name;
  String organizationName;
  String streetAddress;
  String city;
  String state;
  String postalCode;
  String country;

  LocalDateTime domainCreated;
  LocalDateTime lastModified;
  String status;
  String registarCreated;
  String currentRegistar;


}   

Repository

@org.springframework.stereotype.Repository
public class Repository {

  private static Logger logger = Logger.getLogger(Repository.class.getName());

  @Autowired
  private JdbcTemplate template;

  private String findDomainInfo = "select * from r_domain where name = ?";

  public TemporaryModel findDomainInfo(String domain) {
    logger.log(Level.INFO, "searching by domain: " + domain);
    try {
      TemporaryModel temporaryModel = template.queryForObject(
          findDomainInfo,
          new Object[]{domain},
          new DomainRowMapper()
      );
      logger.log(Level.INFO, "found: " + temporaryModel);
      return temporaryModel;
    } catch (EmptyResultDataAccessException e) {
      logger.log(Level.INFO, "not found by domain: " + domain);

      return null;
    }
  }

}

class DomainRowMapper implements RowMapper<TemporaryModel> {

  @Override
  public TemporaryModel mapRow(ResultSet rs, int i) throws SQLException {
    return new TemporaryModel(
        rs.getLong("id"),
        rs.getLong("oid"),
        rs.getString("name"),
        rs.getLong("tld"),
        rs.getString("registrant"),
        rs.getString("c_admin"),
        rs.getString("c_tech"),
        rs.getString("c_bill"),
        rs.getDate("expired")
    );
  }
}

Controller

@RestController
@RequestMapping("api/whois")
public class Controller {

  @Autowired
  Repository repository;

  @PostMapping
  public TemporaryModel whois(@RequestBody Request request) {
    return repository.findDomainInfo(request.domain);
  }

}



How to transfer data from DB1 to DB2 (different network/server)

I want to set up a website with a form in it. The form will transfer the data to the DB, but I think it is not safe to let the personal data in the db which is external reachable. So I thought I should transfer the datas via PHP from the DB1(server1 - external reachable) to DB2(server2 - only internal reachable). The following picture should be help to know what I am searching for.

screenshot

Is there any names/methodes to google for?




Mac office not open word file from web

I would like to open, not download office file from web, specially from SharePoint. So I've created document link like this:

<a href="ms-excel:ofe|u|http://test.com/folder/excelfile.xlsx"></a>

Where ms-excel:ofe|u| is Office URI Scheme, specially open for edit command. So this link work perfect when client using chrome and has installed office on windows. Specially there is forms based authentication on that web server (SharePoint). So after click on the link user should sign in order to open the document. The issue that on mac OS after sign in mac office freeze, not responding and document not opening. But when I use some other file out of that site without authentication, then office file open on mac office.




creating crowd sale ERC20 token

I want the latest smart contract in which I am able to create my own ERC20 token and from another account, anyone can buy it and it can be run in a remix

smart-contract has the function of Whitelist, Hard cap, Soft cap, Lockup, Crowd token sales, ETHICAL ICO, Large investor bonus

CONTRIBUTOR & PRIVATE ROUND, PRIVATE ONLY SALE, FIRST CROWD ROUND, VOUCHER SALE

In a simple word if I will say I want to create a smart contract which will create my own ERC20 token and all the feature of ERC20 token 1. Anyone can buy it and sale it (as we set the rate of our ERC20 token) 2. Only Whitelist account can buy it 3. we can set the bonus of your ERC20 token( Large investor bonus, pre-sale, VOUCHER SALE)

Code i have used pragma solidity ^0.4.19;

library SafeMath {

function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
        return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
}

function div(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a / b;
    return c;
}

function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
}

function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
}

}

contract Ownable {

address public owner;

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

function Ownable() public {
    owner = msg.sender;
}

modifier isOwner() {
    require(msg.sender == owner);
    _;
}

function transferOwnership(address newOwner) public isOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
}

}

contract StandardToken {

using SafeMath for uint256;

event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);

mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;

uint256 public totalSupply;

function totalSupply() public constant returns (uint256 supply) {
    return totalSupply;
}

function transfer(address _to, uint256 _value) public returns (bool success) {
    if (balances[msg.sender] >= _value && _value > 0) {
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    } else { return false; }
}

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
    if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
        balances[_to] = balances[_to].add(_value);
        balances[_from] = balances[_from].sub(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        Transfer(_from, _to, _value);
        return true;
    } else { return false; }
}

function balanceOf(address _owner) public constant returns (uint256 balance) {
    return balances[_owner];
}

function approve(address _spender, uint256 _value) public returns (bool success) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
}

function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
}

}

contract ERC20Token is StandardToken, Ownable {

using SafeMath for uint256;

string public name;
string public symbol;
string public version = '1.0';
uint256 public totalCoin;
uint8 public decimals;
uint8 public exchangeRate;

event TokenNameChanged(string indexed previousName, string indexed newName);
event TokenSymbolChanged(string indexed previousSymbol, string indexed newSymbol);
event ExhangeRateChanged(uint8 indexed previousRate, uint8 indexed newRate);

function ERC20Token() public {
    decimals        = 0;
    totalCoin       = 1070;                       // Total Supply of Coin
    totalSupply     = totalCoin * 10**uint(decimals); // Total Supply of Coin
    balances[owner] = totalSupply;                    // Total Supply sent to Owner's Address
    exchangeRate    = 20;                            // 100 Coins per ETH   (changable)
    symbol          = "VT_qls_TICKER";                       // Your Ticker Symbol  (changable)
    name            = "VT_qls";             // Your Coin Name      (changable)
}

function changeTokenName(string newName) public isOwner returns (bool success) {
    TokenNameChanged(name, newName);
    name = newName;
    return true;
}

function changeTokenSymbol(string newSymbol) public isOwner returns (bool success) {
    TokenSymbolChanged(symbol, newSymbol);
    symbol = newSymbol;
    return true;
}

function changeExhangeRate(uint8 newRate) public isOwner returns (bool success) {
    ExhangeRateChanged(exchangeRate, newRate);
    exchangeRate = newRate;
    return true;
}

function () public payable {
    fundTokens();
}

function fundTokens() public payable {
    require(msg.value > 0);
    uint256 tokens = msg.value.mul(exchangeRate);
    require(balances[owner].sub(tokens) > 0);
    balances[msg.sender] = balances[msg.sender].add(tokens);
    balances[owner] = balances[owner].sub(tokens);
    Transfer(msg.sender, owner, msg.value);
    forwardFunds();
}

function forwardFunds() internal {
    owner.transfer(msg.value);
}

function approveAndCall(
    address _spender,
    uint256 _value,
    bytes _extraData
) public returns (bool success) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    if(!_spender.call(
        bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))),
        msg.sender,
        _value,
        this,
        _extraData
    )) { revert(); }
    return true;
}

}




Extract all 'Alt" text present in all tags from html page

I want to extract all text of alt attribute from all tags of web page in python using bs4. i.e. if any html page contains 'alt' attribute in any tag (img,ul,p,a,etc) It should extract from all tags.




why do i get error during making web scrapping

i'm currently making a web scrapping project, and i follow tutorial. i'm using python 3.7.4 and already install beautifulsoup4,requests and pandas using 'pip install --user '. i have the file name try.py and the code is

import requests
from bs4 import BeautifulSoup

page = requests.get('https://forecast.weather.gov/MapClick.php?lat=40.940780000000075&lon=-87.45408999999995#.XZGB-XQzbIU')
soup = BeautifulSoup(page.content, 'html.parser')
print(soup)

when i run the command the error i get are:

"C:\\Program Files\\Python37\\python.exe" c:\\Users\\alip\\.vscode\\extensions\\ms-python.python-2019.9.34911\\pythonFiles\\ptv
sd_launcher.py --default --nodebug --client --host localhost --port 57662 c:\\xampp\\htdocs\\alipscrap\\try.py
Traceback (most recent call last):
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\connection.py", line 394, in connect
    ssl_context=context,
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Program Files\Python37\lib\ssl.py", line 423, in wrap_socket
    session=session
  File "C:\Program Files\Python37\lib\ssl.py", line 870, in _create
    self.do_handshake()
  File "C:\Program Files\Python37\lib\ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\urllib3\util\retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='forecast.weather.gov', port=443): Max retries exceeded with url: /MapClick.php?lat=40.940780000000075&lon=-87.45408999999995 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\alip\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "c:\Users\alip\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
    run()
  File "c:\Users\alip\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "C:\Program Files\Python37\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Program Files\Python37\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\xampp\htdocs\alipscrap\try.py", line 4, in <module>
    page = requests.get('https://forecast.weather.gov/MapClick.php?lat=40.940780000000075&lon=-87.45408999999995#.XZGB-XQzbIU')
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\alip\AppData\Roaming\Python\Python37\site-packages\requests\adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='forecast.weather.gov', port=443): Max retries exceeded with url: /MapClick.php?lat=40.940780000000075&lon=-87.45408999999995 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))

why do i do get this error




ASP.NET MVC Anonymous SMTP and security recommendation

There are 2 parts here, I have an issue with SMTP sending anonymously and I have a question about the SQL Connection MDF vs OWIN series regarding security.


First part: I am working on a website where I have finished with register and I need to work on a email verification.

I know this may be a duplicated topic, but I've been going through the similar topics and tried a lot of solutions and no luck.

I am trying to send a NoReply anonymous email to any users with a verification code, and the main issue is that I cannot send the anonymous SMTP email. I can't use gmail or anything like that. My site is called eOfferList and the email should be like "NoReply@eOfferList.com" which is why I called it anonymous.

The error I've been getting is "Failure sending email" which isn't coherent since I don't know what exactly is causing that error. I've tried many different ways such as with/without credentials and did as much research as I could, but no luck:

My code:

MailMessage mail = new MailMessage("NoReply@eOfferList.com", email);
SmtpClient client = new SmtpClient();
mail.IsBodyHtml = true;
mail.Subject = "EOfferList Registration verify";
mail.Body = "Thank you for registering to eOfferList.com. Please click in the link below to verify your account\n";                        
client.UseDefaultCredentials = false;
client.Port = 465;
client.EnableSsl = true;
client.Host = "mail.eOfferList.com";
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Send(mail);

Even I've tried to change SSL and port, still no luck. So, anything I can do to send the anonymous email? Or what do you guys at least recommend?

PS: If I have to use OWIN, then I'll have to rebuild my whole project which leads me to another week of work and to the second part of this topic.


Second part: I wonder what is the security difference between OWIN and using Model/SQL server database.

Basically I am using this code to start the SQL connections:

using (eOfferListDBEntities eDb = new eOfferListDBEntities())
{
    using(SqlConnection con = new SqlConnection(eDb.Database.Connection.ConnectionString))
    {
        //Code goes here
    }
}

I don't know how to use OWIN yet, so I am now using Entity Model/SQL server database and I parameterize all of my data and hashed any of my important info.

I am wondering what is/isn't secure about Model/SQL with parameters/hash and about OWIN, because I want to decide whether or not I should rebuild my whole project and start using OWIN.

The only main thing I am worried about is having hackers access to any of SQL data. I mean IF what I'm doing now is secured enough to not let hackers get any of information from my database, then I won't have to rebuild my project.

What do you guys recommend about database security, should I leave it as is or should I rebuild and start using OWIN?




Angular 7: Want to display html page without creating extra component

In my application if a user is not verified but exists ...So I wanted to show him an html page .. What should I do ?? I saw on internet that 2 division and switch from that .. But I don't want to that..




Is there a website that has free file hosting with direct link download and file swap?

I am trying to find a website. It has free file hosting and direct download link. Also, the website can change uploaded files without changing the download link. Are there any suggestions?




Quiero desarollar mi habilidad para crear paginas webs, que deberia aprender?

Quisiera poder desarollar mis habilidades para crear paginas web de cualquier tipo, pero me gustaria aprender mas acerca sobre el backend, en que lenguaje me recomienda enfocarme? me gustaria tambien poder usar angular y laravel en mis proyectos, creo para mi son tecnologias de ultima generacion para crear webs super buenas.




Magento 2: Database user does not have enough privileges

I am trying to install Magento 2 but I have some issues. The following image shows the message that appears when I try to add a Database. Database user does not have enough privileges while installing Magento 2

I found a solution online that says to check the my.ini file in MySql config section and delete skip-grant-tables, then restart the server. After I do that I can continue to the next steps of installing magento 2 but another issue appears. I tried to refresh phpMyAdmin and I got the following error.

enter image description here

Even though I could not gain access to phpMyAdmin I was able to continue the installation of magento 2. As soon as I finished the installation, I tried to access the link for the admin but nothing appeared to the screen. As shown in the following images.

enter image description here

enter image description here

Then I thought, I am going to put back skip-grant-tables in the my.ini file and restart the server. Now I gained access to phpMyAdmin as shown in the following image but now I lost access in the magento 2.

enter image description here

enter image description here

Do you have any suggestion? Thank you!




Using Class in Javascript instead of ID

I just copied some code in javascript, but it doesn't actually working because what I had is "class" not "id". document.getElementById("classname"). how do you do it in JS using "class" it is not recognized that's why my JS failed, there is another way of using class in JS ?




Add elements to website for pdf files in a folder

I am trying to create a simple personal website and i would like to have a page that lists a number of citations (56 in my case). I have all the papers in a folder in the website's directory. What's the best way to add them into my html webpage? I am using a card for each one of them. I am basically trying to automate this task instead of manually adding each one of them.

Thanks in advance.




Site Developement in Pure C

I'm a systems programmer, accustomed to C. But I want to make a site for my project. Given my systems programming background, I had the idea to use the trusty old C, but people called me crazy (in fact they used worse words). When I asked to elaborated, they said that C is obsolete, not well supported and I wont find any free or cheap hosting supporting bare metal C. They also don't want to maintain C code after me.

These are valid reasons, but a bit on the subjective opinionated side - not enough to push the hardened C/C++ fanatic into learning PHP, which I know is buggy and slow (alternatives like Ruby are even slower - I benched). I heard, they even rewrote Facebook code into C++, because PHP was slow and inflexible. Moreover, PHP favors the-shared-nothing architecture, while in C I can just fire pthreads inside single process with in-memory key-value DB, and it will be lightning fast. If I need some higher level scripting, I could just attach a LUA interpreter.

So is there any single big reason people shouldn't develop web sites like they say develop video games?




Background image not displaying on personal website

I am trying to display a background image on a few pages of my personal website that I am building.

I've tried to make sure that my CSS stylesheet is loaded correctly by checking my website's network (and I believe it is), I've tried to make sure that the file path to the image is correct by putting the image folder in all possible places and tried to put the full file path in the url() function, and I've tried to create different elements on my page to see if it was just an issue of my image not being displayed in a valid element. None of these have worked so far

My html index / home page:

<html lang="en">
<head>
    <% include ../helpers/head %>

</head>

<body>
  <header>

  </header>

  <!-- the class 'page-header' creates bootstrap components.  -->
  <div class="page-header">

    <% include ../helpers/navbar %>

    <h1>Home</h1>

  </div>

  <div class="element">
      <h2>

      </h2>
  </div>

</body>

</html>

my main.css file:

* {
  margin: 0;
  padding: 0;
}

.element {
  background-image: url(professional1.jpg);
}

header {
  background-image: url(**relative filepath inserted here);
}

.page-header {
  background-image: url(**full filepath inserted here**);
  background-color: #00bda5;
}

body {
  background-image: url('professional1.jpg');
  background-size: cover;
  background-position: center;
}

my html head.ejs file:

<meta charset="UTF-8">
<title>My Website</title>


<!-- First we import our css files -->

<!-- bootstrap css -->
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />

<!-- Google font CSS -->
<link href="https://fonts.googleapis.com/css?family=Poppins:400,700" rel="stylesheet">

<!-- this app's own css -->
<link rel="stylesheet" type="text/css" href="css/main.css"/>


<!-- Next import js files -->

<!-- first we import jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<!-- then bootstrap -->
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>

<!-- then own js file -->
<script src="js/main.js"></script>

So far, I am not seeing image whatsoever. Is anyone able to see the issue?




SEO next.js vs MPA difference?

I'm thinking about a new stack for the project and I don't know if there is any difference between SEO web apps with next.js and classic multi-page application, including the price when engaging a third-party company for seo?




How to connect google earth with my website?

I need some help please.

I want to connect my website to Google earth and allow the user to choose his location. After that allow the user to draw a polygon around his house.

Is there any possible way to do that ?

Thanks for helping




Is there any possibility to share a story from website to instagram?

I´m currently working on a new web project and need to include an autoshare option for instagram stories in it. Is there any possibility to share it directly over an api in the frontend or maybe somehow over the backend? Backend is written in Java.

Been searching the internet and found out that in the past it´s been prohibited to share Instagram Stories via api. Is this still the case?




How to inform Google a certain page in the website desktop view has more than one page in the mobile version?

Imagine there is a webpage, for example, profile page of a social network. Users by desktop devices see the profile page at this URL example.com/profile/john-doe which shows all of the user information in one single page. But users by mobile device, see a bunch of tabs (ex: about, posts, links, pictures) and each tab represents relevant information. Here are links that mobile users will have:

  1. example.com/profile/john-doe?tab=about
  2. example.com/profile/john-doe?tab=posts
  3. example.com/profile/john-doe?tab=links
  4. example.com/profile/john-doe?tab=pictures

The canonical link of the desktop page is equal to the URL (example.com/profile/john-doe), and the canonical link of the mobile version is also as same as the current URL with active tab, ex: example.com/profile/john-doe?tab=about or example.com/profile/john-doe?tab=pictures.

This caused problems in Google search result, that shows multiple pages with tabs that found on mobile devices on the desktop search result. Means the desktop user does not see 4 different results for one john-doe page.

The other problem is that the search console excluded many links because Google probably noticed bad URL usage pattern.


Is there any special meta tag or solution to inform Google that these certain mobile pages belong to one page in desktop?




@PostMapping - Angular + Spring Boot

For some reason I can't make a @PostMapping work, wierd thing is, other post is working.

Here are the 2 methods from Spring, the first is working, the second one is not working (By not working I mean that even the System print is not being called, it's like the server is not getting the request, while the second one does). I have no idea what is wrong, I tried entering the full URL - did not help. tried almost about everything.

@PostMapping(path = "", consumes = { "application/json" })
public void create(Authentication authentication, @RequestBody Coupon coupon) {
    System.out.println("Create was called");
    if (coupon != null) {
        // updating UserModel_Coupon
        UserModel temp = userRepository.findByUsername(authentication.getName());
        couponRepository.save(coupon);
        temp.createCoupon(coupon);
        userRepository.save(temp);
    }
}

@PostMapping(path = "/buy", consumes = { "application/json" })
public void buy(Authentication authentication, @RequestBody Coupon coupon) {
    System.out.println("Purchuse was called");
    if (userRepository.findByUsername(authentication.getName()).getRoles().equals("CUSTOMER")
            && coupon.getAmount() >= 1) {
        UserModel temp = userRepository.findByUsername(authentication.getName());
        Coupon tempc = coupon;
        temp.createCoupon(tempc);
        tempc.setAmount(tempc.getAmount() - 1);
        couponRepository.save(tempc);
        userRepository.save(temp);
    }
}

the angular code - I am getting the console log for both of them, and both of the logs are responding - again, the first one is working, the second one won't work (the console.log is working, and I'm getting the JSON of the 'coupon' object).

 createCoupon(coupon) {
    console.log("Create request sent")
    return this.httpClient.post<Coupon>(`${API_URL}/coupon`, coupon)
  }

buyCoupon(coupon) {
    console.log(coupon)
    return this.httpClient.post<Coupon>(`${API_URL}/coupon/buy`, coupon)
  }



how to Upload any type of files asp.net VB web

I have upload files... this is my upload button:

<div class="col-sm-5"> <label class="btn btn-primary btn-block btn-file"> <input type= "file"name="ctl00$ContentPlaceHolder1$FileUpload1"id="ctl00_ContentPlaceHolder1_FileUpload1"> <img src="../images/pngformat/attachment.png"> Upload here... </label> </div>

but just upload .Zip/.PDF and .JPG files... i need upload any file format ... my code generate by VB .Net 4.5 and use IIS 7

how to set upload any type of files ???




samedi 28 septembre 2019

What happens when i put "data" as class in a div tag

<div class="data">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit odit labore ratione in perferendis perspiciatis repellendus fugit? Molestiae incidunt autem eum? Accusamus dignissimos facere consequuntur beatae assumenda? Numquam, nam a.

</div>

above code shows this as output :

Lorem ipsum dolor sit amet consectetur adipisicing elit. Impedit odit labore ratione in perferendis perspiciatis repellendus fugit? Molestiae incidunt autem eum? Accusamus dignissimos facere consequuntur beatae assumenda? Numquam, nam a. // = 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf()); } parent.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function (msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) { console.log('Live reload enabled.'); sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true); } })(); } else { console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.'); } // ]]>

can anyone explain what is happening here and what is the meaning of data class in html. is it reserved or have i made some other mistake.




Keeping login status in Flutter Web

I'm new to Web development and I'm playing around with Flutter for Web.

I have a question, towards handling of Login in Flutter Web. What's the best practice of it?

As I came from Mobile background it's very easy - all we need to have a user singleton/use shared prefs and check it before doing any operation. But how this would be implemented in Flutter Web?

Hope my question is clear enough.

Cheers




C# - Run a hosted web application inside the .exe

I have a hosted web application: http://tuts.techedu.in/kids/sapshidi/snake.html

I want to run this inside my .exe

I thought I would just be able to use something like:

webBrowser1.Navigate("http://tuts.techedu.in/kids/sapshidi/snake.html");

But that doesn't seem to work at all.

Any ideas on how I can achieve this?

Thanks in advance




How to fix "Something Went Wrong!" error on Wordpress

I'm getting an error with the mobil version of my webpage. There is no problem when accessing the website through a computer or laptop but when accessing it on a mobile device it says something went wrong.

Just to give you an idea of the setup - I'm designing the website through Kartra - and using WordPress as the website builder.

Can someone please help I've also attached a screenshot of the error I'm seeing on the phone.

enter image description here




Upload multiple files using different forms

I am building a web application where the end user would upload multiple files. Now the simplest way is to ask the user to upload multiple files using the same form and then just iterate over the files in the app logic but there are two important concerns:

  1. I want to keep track of the file not using it's name but using the form. For example, if the form says Upload report csv. The advantage of this approach is that I know that no matter what the filename is, it always belongs to the report category.
  2. The user can make a mistake and instead of multiple files, he/she can upload only one. So for each category like reports and data, I want that there are two forms and once the first file is uploaded successfully, the page should refresh and should ask for the other file belonging to different category.

In short, I want to do this: Form1-> upload reports -> Uploaded -> Refresh/Redirect -> Form2 ->upload data file




Which web framework is best for me?

I want to learn one web framework from these:

  • Asp.net
  • Django
  • Laravel
  • Spring

here,given some skill of mine:
1.core php (already done 2 dynamic web project)
2.jsp/servlet (already done 1 dynamic web project)

I am confusing to decide which framework is best for me...I determined that one of them i should learn at lest one framework.

Please give me suggestion. Advance Thanks !!!!




How to find all resources loaded not over HTTPS on the website with thousands pages?

I have a site with 10k+ pages. It works over HTTPS But some pages may contain third-party images and javascript loaded over HTTP. A few pages contains also third-party javascript loaded over HTTPS, but that can loads another third-party resources over HTTP.

How can I check all 10k pages regularly and find pages with resourses loaded over HTTP?

I found some SSL checker that can do it (see Other risks of personal data breaches). But it only checks 20 pages.

Is there any solution or script for my 10k pages?




Nginx location not working even as expected

The following is the configuration I have in my project nginx.conf. When I am trying to access the application by using the url http://localhost:8080/session/ , I am getting the error 404 not found.

The url works fine if I have the location as

location / { }

server {
listen       80;
server_name  localhost;
error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /usr/share/nginx/html;
}
location /session {
    root   /app;
    index  index.html;
    try_files $uri $uri/ /index.html;
}

}




Ruby web application

Is ruby ​​code evaluation / calculation of a user input secure?

For example

example.com/show?users=#{2+2} response > 4

example.com/show?users=+2*4 response > 8 



update my project with git command on degitalocean

Hello everybody !

So i have a project made with laravel and vuejs on degitalocean and I made some changes on my localhost (desktop) , now i want applied those changes on degitalocean server ( make an update to my project for files who was changed only ) how can i do that with git command ?




How to upload an image with static URL on Firebase Firestore

Okay. So I'm building a system where users have to upload their profile picture.

After uploading and getting the URL, I store it in various collections in my database. The issue is, when a user updates their profile pic, I'd have to update all instances of the profile pic on my database which is quite cumbersome.

I want to know if I can update a profile picture with the same URL as the previous one, so that all URLs on the database would be unchanged but dynamic...




vendredi 27 septembre 2019

Why network request's time is -1ms during resource loading?

When resources are loaded, it gives -1ms time in request as seen in the image. I want to know why does this happen?




How can I make a powershell script click on or fill an element without a name or and id?

I'm trying to write a powershell script for loggin in automatically on a website (in IE) and managed to fill the user name value based on it's ID but the password field and the login button have no ID at all. Password field has a name but I can't find a way to use that and login button doesn't even have a name on the website.

User name field:

As you can see the User name field has an actual ID so it's easy to do. But...

Password field:

I'm trying to fill it like this: $ie.Document.getElementByID('password field ID...').value = 'myPassword'

Login button:

I'm trying to click on it like this: $link=$ie.Document.getElementByID('login button ID...') $link.click()

Since none of these elements have an ID, that one won't work. Do you have any suggestions?




how can I save a xml on a website and reload later?

In a simple way, all I want is a way for make a web-site where the user changes a xml table(add, edit and remove), save the xml in a file and can load a xml file for substitute the current one.

The site content is based on xml information, but I need the user can save and load the xml content, and I don't know how to do it.

Can someone help me?




What does Uploading files to a Server depends on

i have a confusion when it comes to Uploading files to a web server

What makes it fast or slow?

How much internet does the server use in order to receive the uploaded file, i know it may sound weird but does the server download the uploaded file or just receive it?

And is it the same for FTP and P2P or different from them?

Could anyone clarify this part for me?




Concatenate text with bind on image source

I'm developing an client application for my asp.net website and i want to show some pictures on this client. On the browser, it returns the image path like this: "/Image/img.jpg", and it works fine. But on the WPF i can't show those images.

I'm using EF to return me a list of objects that have the image filename and i pass them to my listview wich have the ItemTemplate to bind the image. To display the image i tried the string format like this:

<Image Source="{Binding Photo, StringFormat='https://localhost:1234/Image/{0}'}"

It displays the correct path, but dont show any image.




Attempting to Install FireflyIII - PDO Exceptions

I am following a guide for installing FireflyIII as a personal finance project.

pi@raspberrypi:/var/www/html/finance $ php7.2 artisan migrate:refresh --seed

In Connection.php line 664:

  could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type  
   = 'BASE TABLE')                                                                                                                            


In PDOConnection.php line 31:

  could not find driver  


In PDOConnection.php line 27:

  could not find driver                        

Of course I look in the php.ini file and see:

...
extension=mysqli
...
extension=pdo_mysql
...

I check these packages:

pi@raspberrypi:/var/www/html/finance $ sudo apt install php7.2-mysql
php7.2-mysql is already the newest version (7.2.9-1+b2).

pi@raspberrypi:/var/www/html/finance $ sudo apt install php7.2-pdo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'php7.2-common' instead of 'php7.2-pdo'
php7.2-common is already the newest version (7.2.9-1+b2).

I check the phpinfo() page.

I created the user in MYSQL for firefly and the database:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'firefly'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.007 sec)
MariaDB [(none)]> CREATE DATABASE firefly;
ERROR 1007 (HY000): Can't create database 'firefly'; database exists

Which is echoed in the .env file:

DB_CONNECTION=pgsql                                                                                                                            
DB_HOST=firefly_iii_db                                                                                                                         
DB_PORT=5432                                                                                                                                   
DB_DATABASE=firefly                                                                                                                            
DB_USERNAME=firefly                                                                                                                            
DB_PASSWORD=password

And I rebooted this thing after reseting the apache2 server about three times.

What else could it be?





How do I obtain the WSDL from a remote SOAP service using javascript to generate a tree list on my web page showing the service methods?

This is what I need: - Obtain the remote WSDL to manipulate it using XMLDom. - Having that, its easy to generate a tree form list using CSS and HTML.

Thanks for the help that you can give me to solve this problem.




I am not able to set the background image using CSS

I am not able to understand why in the background the image is not getting displayed.

body{
        background-image: url('../Images/Chicken.jpeg');
        background: cyan;
}

The path of the image is right. whats the problem then? but the background color is getting being displayed.




ADDING TO FACEBOOK LIVE BROADCAST SITE?

my site's home page on my facebook page when I want to have a live broadcast automatically live add-ons that do. (for wordpress), if there is no live broadcast, the last video will be played.

i did something like the following but it needs to create its own video id to be automatic. (automatic)

my question is; How the video id occurs automatically.

may be on a different path. codes may change completely. as long as there is a live broadcast on the site automatically

I hope I could tell you my problem.







    <div class="fb-video" data-href="https://www.facebook.com/video.php?v=10152795258318553" 
  data-width="500" data-allowfullscreen="true"></div>

<script>window.fbAsyncInit = function() {
  FB.init({
    xfbml      : true,
    version    : 'v3.2'
  });
  }; (function(d, s, id){
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement(s); js.id = id;
    js.src = "https://connect.facebook.net/en_US/sdk.js";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-video" data-href="https://www.facebook.com/video.php?v=10152795258318553" data-width="500" data-allowfullscreen="true"></div>



Video conversion slow on large videos ffmpeg adult website

So I'm building an adult website and people will upload videos. The backend is built with node.js. Some videos which could potentially be uploaded may be many hundreds of mb in size. Problem is video conversion with ffmpeg is relatively slow. I am considering other options such as client side video conversion ( probably slower but far less load on my servers). I don't know a great deal about how these very big video websites handle processing the large number of videos. Anyone able to advise me on how i should best go about it? They all get converted to a range of sized mp4's. A range of gif and png thumbnails are also generated. My system is working and for a video say 10mb in size its fine but its been going over an hour now converting a 236mb video to five sizes ( different widths so i can save data on mobile devices). I have a fully working system which handles different resolutions all that converts them but the conversion is a tad too slow for me and i dont want to invest in very expensive hardware if i can help it cos this will be a startup. I was probably going to use a cdn for hosting the actual content but have designed it so i can host on my own servers within the network too. At present my system is designed to have a number of servers all with an interserver communication channel and also the ability to automatically use SFTP to share files with each other. The video gets uploaded to one of a number of designated multimedia servers and converted. Then it gets distributed to the other multimedia servers so they can all provide it. That all works great. What I mean is i can pretty much implement any solution anyone has to this problem. But I dont know what the best solution is.




Is there any public socities to work together for free under an idea?

I have many great ideas but do not have any people to talk about it, place where to send such ideas, so. How to find people who can help to implement some global technical ideas?

Main idea:

  1. Find the way (I have an idea) to make web frameworks and every application replaceable, a new standard.
  2. Create something like bit.ly, but as the result of step 1, replaceable plugin-applications database.
  3. Join all frontend worlds using this database

Look optimistic, but, where to find someone to talk about, do something? I cannot just sit and avoid these ideas just doing my current job well.

I was thinking about W3C, but it seems impossible to do something w/o a company (cannot obtain membership). Strange, but I remember I saw a place to post an idea, but cannot find it now.




Need help scraping PowerBI created tables using PHP , json

when scraping PowerBI created tables using PHP/Json, some table values are captured and some are not. Not sure how what to do next.




Why am I gettting the following error and how to check if the directory exists?

I have a new webhost and they told me that this particular panel is pretty good but it is not cpanel, does anyone know what kind of a panel this is? I am also getting the following error and just wondering how I could check if the folder exists or not? because I can't find the folder called var?

Warning: session_start(): open(/var/cpanel/php/sessions/ea-php73/sess_5bc77575be1faa655411e0eb9ef76535, O_RDWR) failed: No such file or directory (2) in /home/pianocou/domains/pianocourse101.com/public_html/header2.php on line 3

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php73) in /home/pianocou/domains/pianocourse101.com/public_html/header2.php on line 3

enter image description here




How can I hide an element in an iframe?

I tried to add an iframe element (ID is "intra"), wich works very well.

But the next thing I tried was hiding a div (id="top") to hide the header from: is there a way hide elements in IFRAME src page?, but this wouldn't remove the header.

Here's my code:


    <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

    <script type="text/javascript">
    $('#intra').load(function(){
        $('#intra').contents().find('#top').hide();
    });

Can you guys see what's wrong with this?

Or is there even a possibility to hide that element using HTML?




How to plot points(data) in D3 using country if i don't have Lat long

Am using d3.js in my angular7 project to display the map and am using https://datamaps.github.io/ datamaps which is also using d3.js. to plot points(data) we need lat-long but what if I don't have lat-long and I have a country name then how can I plot the points(data) without lat-long.

bubble_map.bubbles([ { radius: 10, centered: 'BRA', country: 'USA', data: { Open: 120, Closed: 40, Agriculture: 60, Water: 34, Finance: 10, Transportation: 8, Other: 4, } }, { radius: 8, country: 'USA', centered: 'USA', data: { Open: 120, Closed: 40, Agriculture: 60, Water: 34, Finance: 10, Transportation: 8, Other: 4, } }, { radius: 12, country: 'USSR', latitude: 73.482, longitude: 54.5854, data: { Open: 120, Closed: 40, Agriculture: 60, Water: 34, Finance: 10, Transportation: 8, Other: 4, } } ]}

export class MapComponent implements OnInit {

constructor() { }

ngOnInit() {

let bubble_map = new Datamap({
  element: document.getElementById("container"),
  height: '460',
  scope: 'world',
  geographyConfig: {
    popupOnHover: false,
    dataUrl: null,
    borderColor: '#E5E5E5',
    hideAntarctica: true,
    hideHawaiiAndAlaska: true,
    borderWidth: 1,
    borderOpacity: 1,
    highlightOnHover: true,
    highlightFillColor: '#F2F2F2',
    highlightBorderColor: '#E5E5E5',
    highlightBorderWidth: 1,
    highlightBorderOpacity: 1,
    exitDelay: 100,
    animate: true
  },
  fills: {
    defaultFill: '#F2F2F2'
  },
  bubblesConfig: {
    borderWidth: 4,
    borderOpacity: 1,
    animate: true,
    fillColor: '#fff',
    borderColor: '#632AFF',
    popupOnHover: true,
    highlightFillColor: '#fff',
    highlightBorderColor: '#632AFF',
    highlightBorderWidth: 6,
    exitDelay: 100
  },
  arcConfig: {
    strokeColor: '#DD1C77',
    strokeWidth: 1,
    arcSharpness: 1,
    animationSpeed: 600
  },
  done: function() {},
});

// d3.select(window).on('resize', function () {
//   bubble_map.resize();
// });

bubble_map.bubbles([
  {
    radius: 10,
    centered: 'BRA',
    country: 'USA',
    data: {
      Open: 120,
      Closed: 40,
      Agriculture: 60,
      Water: 34,
      Finance: 10,
      Transportation: 8,
      Other: 4,
    }
  },
  {
    radius: 8,
    country: 'USA',
    centered: 'USA',
    data: {
      Open: 120,
      Closed: 40,
      Agriculture: 60,
      Water: 34,
      Finance: 10,
      Transportation: 8,
      Other: 4,
    }
  },
  {
    radius: 12,
    country: 'USSR',
    latitude: 73.482,
    longitude: 54.5854,
    data: {
      Open: 120,
      Closed: 40,
      Agriculture: 60,
      Water: 34,
      Finance: 10,
      Transportation: 8,
      Other: 4,
    }
  }
], {
  popupTemplate: function (geo, res) {
    // data = {};
    // let name = res.country;
    let newdata = res.data;
    return `<div class="hoverinfo"
       style="
         background: rgba(255, 255, 255, 0.96);
         border: 1px solid #e5e5e5;
         box-sizing: border-box;
         box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
         border-radius: 10px;
         padding: 8px;
         font-family: Roboto;
         font-style: normal;
         font-weight: normal;
         font-size: 10px;
         line-height: 12px;
         color: #000000;
         float: left;
         cursor: pointer;
       ">
         <div style="
           font-size: 12px;
           font-weight: bold;
           margin-bottom: 4px;
         ">${ res.country }</div>
        <div style="
          float:left;
          margin-right: 15px;
        ">
          <div style="margin-bottom: 2px;">Open : ${newdata.Open}</div>
          <div>Closed : ${newdata.Closed}</div>
        </div>
        <div style="
          float:left
        ">
          <div style="margin-bottom: 2px;">Agriculture: ${newdata.Agriculture}</div>
          <div style="margin-bottom: 2px;">Water: ${newdata.Water}</div>
          <div style="margin-bottom: 2px;">Finance: ${newdata.Finance}</div>
          <div style="margin-bottom: 2px;">Transportation: ${newdata.Transportation}</div>
          <div style="margin-bottom: 2px;">Other: ${newdata.Other}</div>
        </div>
       </div>`
  }
});

}

ngAfterViewInit() { }

}




not understanding the get() in webbrowser module

I came across the following code:

linkElems = soup.select('.r a') numOpen = min(5, len(linkElems)) for i in range(numOpen): webbrowser.open('http://google.com' + linkElems[i].get('href'))

Here I am not getting how they have used .get() with list as I know .get() is for dictionary only

the above snippent is from the programme trying to open first five goole search results in browser

please help

Thanks!




jeudi 26 septembre 2019

Automatically creating user profile

This may be a rookie mistake but it has been bugging me for days now

I am trying to create a system in which after my registration is completed a profile is automatically made and saved for the user. I have applied all my current knowledge but the following error keeps showing up.

IntegrityError at /register/ NOT NULL constraint failed: users_profile.standard

Request Method:POST

This is my views.py -

`from django.shortcuts import render, redirect
from django.contrib import messages
from .form import UserRegisterForm
from django.contrib.auth.decorators import login_required

def register(request):
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
form.save()
username = form.cleaned_data.get('username')
messages.success(
request, f'Your account has been created. You are now able to log in!')
return redirect('login')
else:
form = UserRegisterForm()
return render(request, 'users/register.html', {'form': form})

@login_required
def profile(request):
return render(request, 'users/profile.html')

and my signals.py -

from django.db.models.signals import post_save
from django.contrib.auth.models import User
from django.dispatch import receiver
from .models import Profile

@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(user=instance)

@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):
instance.profile.save()

Please help me out here guys, I am desperate.




hide a part of a image of a slider in mobile view

I have a website and in that there is a image slider on that. For mobile devices I wanted to expand the image the image and hide a corner parts of that image. so i used width:140%; and *overflow:hidden;* but it doesn't hide the rest of image. you can check the slider from here. http;//totaldesign.lk




Is it possible to be a web developer without going any institute? [on hold]

Actually I am a literature student. But I dream to be a Web Developer. I am learning from Youtube and some online courses for the last 4 years. If I continue this, is it possible to get a job in this sector? I need some suggestions to fulfill my dream.




Instagram feed on my website is not refreshing

I'm using my Instagram feed on my website with the following endpoint:

https://api.instagram.com/v1/self/media/recent?access_token=ACCESS-TOKEN

That should bring all my posts, but it's not showing recent posts. The last one fetched is from September 17 and since then i made two new posts.

I'm really lost as what could be the problem. There is no other endpoint i can use and the access token is okey.

Im using PHP to retrieve the data, but even if I take a look at the raw JSON data, it's not getting the latests posts either.

Any clues anyone?

Thank you.




How to do variable as part of url?

I am new to flask and I want a structure my GET request URL where it follows:

/api/results?date={YYYY-MM-DD}
(e.g. 2019-09-20)

I've tried @app.route('/api/results?ddate=', methods=['GET']) def get_game(game_id): print("game: ", game_id) return jsonify(game_id)

i've also tried:

@app.route('/api/results?ddate=game_id', methods=['GET'])
def get_game():
    game_id= request.args.get('ddate')
    print("game: ", game_id)
    return jsonify(game_id)



How to open existing file in java without knowing its path?

I want to open a excel sheet in java but I dont want to use absolute path which limits to open only one file




How can I do a For in ASP.Net Webforms that adds elements with the

In my .aspx file, I am trying to add List Items within a Dropdown, through a script that contains a For, but I don't know how to correctly add these items. I did a test example to simplify the problem, with numbers from 1 to 10, so you can understand a little better the problem I am having

I tried this

<asp:DropDownList ID="numbers" runat="server">
    <script runat="server">
        void loop() {
            for(int i=1; i<1=10; i++) {
                <asp:ListItem>i</asp:ListItem>
            }
        }
    </script>
</asp:DropDownList>

the error given says "the name asp does not exist in the current context"




Maps & Geocoding JS Module

So, there's plenty of fish in the pool and it got to be very confusing for someone new in this area.

My specific use case, is to show a small map of an address (including street number) to show where someone resides. The application uses webpages as UI and is Chromium based, so using a web-api is a reasonable choice (the host application runs on Desktop Systems with a Python/C/C++ mix). The application is for doctor's offices and it can be reasonably useful for them to know roughly where they might be going - but it won't be used for any actual routing.

If I were to go with the well known google maps API, it looks like I'd either need to instruct users to get their own API key and then for the application to embed that key, or I'd have to pay myself (which would quickly surpass the usefulness of this feature)

So I'm looking for free alternatives, that just need to resolve an address to put a marker on a map - can even be entirely static.

I've looked at a few, such as OSM, but it seems to not understand street numbers. (Or just not have the data to place them correctly)




how to use scss function or mxin to generate key frame animation

I use named keyframe animations and I want to save myself some writing. I have seen this SO Question regarding scss keyframe function But I feel like its not to helpful (or Im to stupid to understand)

I have tried a couple variations of

$green: limegreen;

@mixin pulse-animation($name, $color) {
  @keyframes #{$name} {
  0% {
    -moz-box-shadow: 0 0 0 0 rgba($color, 0.4);
    box-shadow: 0 0 0 0 rgba($color, 0.4);
  }
  70% {
      -moz-box-shadow: 0 0 0 12px rgba($color, 0);
      box-shadow: 0 0 0 12px rgba($color, 0);
  }
  100% {
      -moz-box-shadow: 0 0 0 0 rgba($color, 0);
      box-shadow: 0 0 0 0 rgba($color, 0);
    }
  }
}
.my-element {
  animation: @include pulse-animation("green", $green) 2s infinite;
}

I would also prefer to not have to pass a name into this mixin.




is there any way that sub-directory of a domain and its sub-domain work exactly the same way?

For example, I have a domain example.com. Then I have created a subdomain from it e.g same.example.com

I want that, same.example.com and example.com/same/ will work the same way. such as same.example.com/another/ and example.com/same/another will make the same result and so will do any other HTTP request and any further sub-directories.

Thank you.




how can i link button onclick to slide to the next panel horizontally

I amtrying to link a button that on clicked it'll slide the second section horizontally to the next div.

I'm having trouble getting it to work here..

codepen.io/brandoniscool/pen/vYBMZyM




How to create an website/webapp to convert an excel file to csv?

I am curious to know how one can go about creating a website/web application, where users can upload an excel file to the website and get a download link for a csv file which is created/converted from the excel file uploaded by the user?

Here's what I think should happen, please correct me or provide some guidance wherever necessary,
(1) We need a webpage to enable the user to upload the file.
(2) The file needs to be validated if it is the correct format, encoding etc before processing it.
(3) Read the uploaded file and process/convert to csv file (How does one do this? Can Python help?)
(4) Put the output csv file into a separate folder??? (5) Provide user with a link to the csv file.

Can someone provide me with a high level overview of how this application can be developed? What are the available technologies to help in this?

Thank you for your help.

Regards.




Python Selenium webdriver timeout exception

I'm working on a project to extract some data from a website. In this website there is search form that I should fill it. One of the inputs which is text, shows a suggestion after entering 2 or 3 characters and I should select that option in order to go forward or search button will be activated. The problem is that when I use the following code:

WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='LocationSuggestionBox']/ul/div/li/div"))).click()

I modified the xpath in above code. The actual xpath is as fllow:

//*[@id="LocationSuggestionBox""]/ul/div/li/div

But I don't know how to add it in my code to not get the syntax error.

The final result with my working code is :

    WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='LocationSuggestionBox']/ul/div/li/div"))).click()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 



There is a way to edit the time of a notification from web page is shown?

Let me explain. I have a web page that send notifications to my users when they get a new message.

I do it with push notification and it works fine but, my users are asking me that the time show of the notification is too slow, that it disappear too fast.

There is a way to maximize the time of the notification to make it be showed like 20 seconds if the user has not interacted with it yet?

If not by code, there would be a way to create a chrome or firefox plugging to make this real?




How can I customize my FTP's "web browser"

I've just setup my FTP server with vsftpd and i was wondering if i could add a bit of css or bootstrap to the web page generated by the ftp server.

This is for a new Linux server running Debian 9 and vsftpd




Spring mvc: One step view or Two Step View?

I am reading famous Fauler's book "Enterprise application patterns" And I can't understand semantic difference between One step view(top part) and Two Step View(bottom part)

enter image description here

I read all text but I understood only one thing: In case of two step view I have 1 additional intermediate logical view. And this is executed by some global "entity".

It is really not clear for me why do I need it. In my practice I use spring - mvc for web application. Could you explain which pattern is used inside this framework? Could I choose/change it ?




Migrated web, changed labels, now have problems with residual code - Google map pin hover pops up old web site name

my first post here ever.

I migrated my old web site to new hosting company, wanted to save money by using the same CMS, just changed labels and UI parts that use old site name.

Now there is only one more problem left, I don't have any idea how to remove old name showing on mouse hover on Google Maps pin. Can it be forced to show nothing at all? I just want to get rid of anything that even resembles

Searched through Google maps.js and I'm not sure what to delete or change to.

// Create a marker for each place.

        markers.push(new google.maps.Marker({

          map: map,

          icon: icon,

          title: place.name, //tried deleting this, nothing changes

          position: place.geometry.location

        }));

I'm being very cautious about changing the code in Google maps js, don't want to break the site.




how to send data to mat lab web server and process it and return the result to the web application?

I want a way to take data from inputs in my web application and process it mat lab and receive the data and show it in my app , i already searched for mat lab web service to take my data and process it but it wasn't what i really wanted , does anyone have a source or way to achieve my goal?




How can I play a dash file (mpd) in an Android WebView?

How can I play an MPD file of mpeg-dash on an Android webview? I am not interested in a native approach, e.g. Exoplayer.




Deploying Laravel&Vue SPA with Vue Components not rendering

I wanted to deploy my Laravel and Vue SPA. I got the Laravel part to work as expected, but the Vue components which are used by vue router are not rendering. I tried different htaccess setups because I think it might be a path issue or the server not finding the files etc.

I tried adding different htaccess configurations and tried to modify my import paths. I also tried to add .default to the requirements but that didnt work either

<IfModule mod_rewrite.c>


    RewriteEngine On
    RewriteBase /public
    RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
    RewriteRule ^(.*) - [E=BASE:%1]

    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule .? - [L]

    RewriteRule .? %{ENV:BASE}/index.php [L]

</IfModule>

import QuestionView from "./components/Question.vue";
Vue.component("question-component", require("./components/Question.vue"));

If I turn on development mode on the server it shows me that the component couldnt be rendered or mounted

I hope someone can help me find the cause of this problem.




Rewrite Url at my website but my index on sub folder

I've been crawling forums for about 2 hours and still haven't found the solution to my problem so I am turning to you guys for help.

My URL looks like this http://sevalinmutfagi.com/list.php?id=1?kategori=borekler I want it to look like this http://sevalinmutfagi.com/tarifler/borekler

I try so much rewrite example but my index file at subfolder in /View/ so i can't rewrite my urls

here my htaccess

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www.)?sevalinmutfagi.com$ [NC]

RewriteCond %{REQUEST_URI} !^/View/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /View/$1 [L]

RewriteCond %{HTTP_HOST} ^(www.)?sevalinmutfagi.com$ [NC]
RewriteRule ^(/)?$ View/index.php [L]

This code work good for redirect subfolder all pages but i try to add rewrite url codes can't work. I hope that has been revealing. Thanks every for help.




JavaScript on apple shortcuts

Im using JavaScript code in apple shortcuts app, in order to be able to auto connect with my own username and password. Im keep getting error messages on my code. Can someone direct me to the right why to do it ? Thank you




How to import pdf file into an iFrame with react js

I want to insert a pdf file into an iFrame using react js. When i insert the pdf file, my iframe shows web page not the pdf. Any conclusion?

this is the code i wrote

      <iframe 
      src={'../../assets/img/dokumentasi.pdf'}
      allowFullScreen
      width="100%"
      height="1000px">
      </iframe>



Drop shadow not appearing in SVG image when viewed on web page

I have been trying to use a svg file as image which contains drop shadows in a web page, but the shadows are not appearing in browser. It appears fine when viewed independently on a separate tab. can anyone help me solve the problem ! Following are the screenshots

Image is fine when viewed separately in browser enter image description here

Drop shadows not appearing in webpage enter image description here




mercredi 25 septembre 2019

how is CSS scroll-snap specified, and it isn't working on firefox

I want to make some scroll snapping on each section. According to the docs, the container should have scroll-snap-type enabled,

and the direct child will be snapped to.

with the following code, how come it doesn't work. However, if i place on body {scroll-snap-type: y mandatory} it works..except only on chrome and safari.. firefox nightly seem to have problems.

* {
    margin: 0;
}

div {

    scroll-snap-type: y mandatory;
}

section {
    scroll-snap-align: start;
    height: 100vh;
    border: 1px solid black;
    background-color: green;
}

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
    <div>
        <section></section>
        <section></section>
        <section></section>
    </div>
</body>
</html>



CSS tr element does not go under the previous tr elements like a row for responsive data table

I am trying to create a responsive data table for a size chart on a website. The size chart becomes a horizontal scroll when viewed on mobile which is the problem I am trying to fix.

Following this webpage https://css-tricks.com/responsive-data-tables/ I applied CSS to the appropriate screen size to change the format of the table to be suitable when view on smaller screens.

The elements contained in the tr tags i.e td are suppose to act as rows, and should display the contents of tr one by one, which it seems to do. But the next tr tag seems to begin displaying its contents right under the first element from the previous tr tag. This causes the elements to overlap one another and I cannot figure out why.

The table also seems quite far off what is seen on the web page displayed above.

This is the website I am working on: https://www.farrier-shop.com/scoot-boots/

This is the code for the appropriate HTML and CSS I am currently using: https://codepen.io/rei-yoshinari/pen/ExYMJyB

CSS:

table {
    width: 100%;
    border-collapse: collapse;
}

tr:nth-of-type(odd) {
    background: #eee;
}

th {
    background: #333;
    color: white;
    font-weight: bold;
}

td, th {
    padding: 6px;
    border: 1px solide #ccc;
    text-align: left;
}

@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px)  {

/* Force table to not be like tables anymore */
table, tbody, th, td, tr{
display: block;
}

/* Hide table headers (but not display: none;, for accessibility) */
tbody th {
position: absolute;
top: -9999px;
left: -999px;
}

tr { border: 1px solid #ccc; }

td {
/* Behave  like a "row" */
border: none;
border-bottom: 1px solid #eee
position: relative;
padding-left: 50%;
}

table td:first-child {
color:red;
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
}

td:nth-of-type(1):before { content: "SIZE "; }
td:nth-of-type(2):before { content: "WIDTH(INCHES) "; }
td:nth-of-type(3):before { content: "LENGTH(INCHES) "; }
td:nth-of-type(2):before { content: "SIZE "; }
td:nth-of-type(2):before { content: "WIDTH(mm) "; }
td:nth-of-type(2):before { content: "LENGTH(mm) "; }

A screenshot of the problem: https://i.stack.imgur.com/uytGF.jpg

Would appreciate if anyone can help me out with a solution!

Cheers




What are the fastest methods to create WAF malicious database?

I'm working on developing a WAF using python, and i have some malicious payloads that the WAF will block, but the data is huge and i don't know much about big data and this stuff, what is the effection way to store the huge amount of this payloads so that the program could easily search in it without huge delay? and show i use database or files to store such data?




What's to stop me from circumventing CSP nonce by inspecting the response header?

I'm a little confused on how nonces work with respect to CSP.

For any website I can easily inspect the response header to find the Content-Security-Policy header and from there I could see the nonce that is being allowed.

If I'm able to find the nonce and if I'm able to insert an inline script. I could just add the nonce to my inline script and inject malicious code. How is the nonce secure?

In addition could you use a meta tag to deliver CSP with a nonce?




Can you create sub-sites inside of sub-sites in Sharepoint? First off, how do you create a sub-site? How do you link a sub-site to a main site?

I am creating a SharePoint for my organization. I am new to sharepoint overall, and I believe I need to make a Site with multiple sub-sites. The idea is that these sub-sites would also have sub-sites until you get to the team you desire, and documents would be uploaded into there (image attached).

-How do I create a sub-site? -How do I link my sub-site into my main site? -Is this even possible? Structure of Sharepoint




How to create smart art ppt in pptxgenjs or any other PowerPoint creation api

I am having a orgchart prepared in dabeng/orgchart I need to convert that into smart art hierarchy in PowerPoint ,currently i am using spring MVC




I cant make this into mobile view

I tried all possible things i could do, I cant make it mobile responsive,its just big and not properly alligned

This is a college site for a portal and I need it to be mobile responsive,IF its possible try and remove the phone preview only when viewed in Mobile I need it in Desktop view site

<!-- Main Sidebar -->
       <aside class="main-sidebar col-lg-2 px-0">
           <div class="main-navbar">
               <nav class="navbar navbar-light bg-white  border-bottom p-0">
                   <a class="navbar-brand w-100 mr-0" href="#" style="line-height: 25px;">
                       <img id="main-logo" style="width:80%;padding: 5px; position:relative;left: 10%;top: 1%;" src="images/ssn_logo.png" alt="Shiv Nadar University">
                   </a>
               </nav>
           </div>
           <div>
               <ul class="nav">
                   <li class="nav-item"><a class="nav-link" href="club_dashboard.html"><i class="material-icons">home</i><span>Dashboard</span></a></li>
                   <li class="nav-item"><a class="nav-link active" href="#"><i class="material-icons">note_add</i><span>Add New Post</span></a></li>
                   <li class="nav-item"><a class="nav-link " href="index.html" onclick="signOut()"><i class="material-icons">power_settings_new</i><span>Logout</span></a></li>
               </ul>
           </div>
       </aside>
       <!-- End Main Sidebar -->

       <main class="main-content col-lg-10 p-0 offset-lg-2 ">
           <div class="main-navbar sticky-top bg-white">
               <nav class="navbar align-items-stretch navbar-light flex-md-nowrap p-0">
                   <div>
                       <a>
                           <img id="dp_url" src="images/user.png" class="rounded-circle" style="position:absolute;left:82%;top:3.5%; margin-top:5px; width: 3.5%">
                           <p style="position:absolute;left:86%;margin-top:11px; top:3.5%;font-size:13px;"><b id="name"></b></p>
                           <p id="position" style="position:absolute;left:86%;margin-top:6px; top:45%;font-size:10px;"></p>
                       </a>
                   </div>
               </nav>
           </div>

1.I want it to be mobile responsive. 2.If possible remove the phone preview only in the mobile view and not the desktop view

I have uploaded the full code on https://codepen.io/SudhakarJ/pen/oNvVydd




hi im using laravel and i have following error please guide me

SQLSTATE[HY000]: General error: 1364 Field 'email' doesn't have a default value (SQL: insert into form1s (name, updated_at, created_at) values (jhiui, 2019-09-25 15:39:57, 2019-09-25 15:39:57)) enter image description here

enter image description here

enter image description here




takes exactly 2 arguments (1 given)

It is views

def hi(request, hh_id):
    return HttpResponse(hh_id)

it is local urls

urlpatterns = [
    url('<int:hh_id>',views.hi)
]

1.I created a django project but it appears

2.what can i do now ?




How do I set the graph to be zoomed in automatically

My web app connects to an app that steams data from a BLE device and gives the users ECG signal and it all works well except that when I load up the web app I have to zoom in a lot on the chart until I can actually see the ECG signal. I assume this is to do with the JavaScript on the web app but I have no idea what to do to set it so it displays the ECG without having to do any zooming in. The graph before zooming in

/* Create chart if doesn't exist */
if (!ecgChart) {
    ecgChart = new Chart(ecgCanvas, {
        type: 'line',
        data: {
            datasets: [{
                label: "ECG Trace",
                backgroundColor: 'rgba(0, 0, 0, 0)',
                borderColor: 'rgb(255, 99, 132)',
                data: ecg_data
            }]
        },
        options: {
            title: { text: "ECG Data" },
            /* Performance */
            animation: { duration: 0 },
            hover: { animationDuration: 0 },
            responsiveAnimationDuration: 0,
            elements: { 
                line: { tension: 0 },
                point: { radius: 0 }
            },
            /* Timeseries */
            scales: {
                xAxes: [{
                    type: "time",
                    time: {
                        unit: 'second'
                    },
                    min: '2',
                    /* Vertical time */
                    ticks: {
                        maxRotation: 90,
                        minRotation: 90
                    }
                }],
                yAxes: [{
                    ticks: {
                        suggestedMin: -300,
                        suggestedMax: 300
                    }
                }]
            },
            annotation: {
                annotations: []
            },
            pan: {
                enabled: true,
                mode: 'xy'
            },
            zoom: {
                enabled: true,
                mode: 'xy'
            }
        }
    })

}

/* Create chart if doesn't exist */
if (!ecgFiltChart) {
    ecgFiltChart = new Chart(ecgFiltCanvas, {
        type: 'line',
        data: {
            datasets: [{
                label: "ECG Filtered Trace",
                backgroundColor: 'rgba(0, 0, 0, 0)',
                borderColor: 'rgb(255, 99, 0)',
                data: ecg_filt_data
            }]
        },
        options: {
            title: { text: "ECG Data" },
            /* Performence */
            animation: { duration: 0 },
            hover: { animationDuration: 0 },
            responsiveAnimationDuration: 0,
            elements: { 
                line: { tension: 0 },
                point: { radius: 0 }
            },
            /* Timeseries */
            scales: {
                xAxes: [{
                    type: "time",
                    time: {
                        unit: 'second'
                    },
                    /* Vertical time */
                    ticks: {
                        maxRotation: 90,
                        minRotation: 90
                    }
                }],
                yAxes: [{
                    ticks: {
                        suggestedMin: -300,
                        suggestedMax: 300
                    }
                }]
            },
            annotation: {
                annotations: []
            },
            pan: {
                enabled: true,
                mode: 'xy'
            },
            zoom: {
                enabled: true,
                mode: 'xy'
            }
        }
    })

}

/* Set new data and update */
ecgChart.data.datasets[0].data = ecg_data
if (showLabels) ecgChart.options.annotation.annotations = labels
else savedLabels = labels
ecgChart.update()

ecgFiltChart.data.datasets[0].data = ecg_filt_data
if (showLabels) ecgFiltChart.options.annotation.annotations = labels
else savedLabels = labels
ecgFiltChart.update()

/* Real-time graph */
clearInterval(interval)
interval = setInterval(pushGraph, frequency)
}

function pushGraph() {
/* Times */
let currentTime = Date.now()

let ecgStart    = new Date(currentTime - offset - 4 * 1000)
let ecgEnd      = new Date(currentTime - offset - 1000)

let spo2Start   = new Date(currentTime - offset - 60 * 1000)
let spo2End     = new Date(currentTime - offset - 1000)

/* Move & update graphs */
try {
    ecgChart.options.scales.xAxes[0].time.min   = ecgStart
    ecgChart.options.scales.xAxes[0].time.max   = ecgEnd
    ecgChart.update()
} catch (ignored) { }
try {
    ecgFiltChart.options.scales.xAxes[0].time.min   = ecgStart
    ecgFiltChart.options.scales.xAxes[0].time.max   = ecgEnd
    ecgFiltChart.update()
} catch (ignored) { }
try {
    spo2Chart.options.scales.xAxes[0].time.min  = spo2Start
    spo2Chart.options.scales.xAxes[0].time.max  = spo2End
    spo2Chart.update()
} catch (ignored) { }
}