dimanche 31 mars 2019

Uploading material to the Web with VBA

I am not proficient in English. I'm sorry. I want to copy two tables, ListObjects ("Tbl1") on Sheet1, ListObjects ("Tbl2") on Sheet2, and upload them as a single post on the web. The range of the table can be changed every time. Logging in to the web, navigating to the bulletin board, pressing the write button and typing the title succeeded. But I have failed to upload the post. Perhaps it seems that you can not find the bulletin board object. Please help me with what to do. Below is my code I created by searching the web.

With ie
    .navigate "http://my_URL/offering"
    ieBusy ie   'Procedure fetched as search (check the ready status)

    .Document.getElementsByClassName("ico_16px write")(0).Click
    ieBusy ie

    Dim oTitle As Object, Ocontents As Object

    Set oTitle = .Document.getElementsByname("title")(0)   'Sometimes fail(sometimes Nothing)
    Set oContents = .Document.getElementsByClassName("xe_content editable")(0) 'evry time fail(=Nothing)

    oTitle.Value = "my Title"
    oContents.Value = ????
    .Document.forms(0).submit   'I could not confirm it because it did not work anymore.

End With


title HTML

board HTML




Error. Page cannot be displayed. Please contact your service provider for more details

After host the site making an error "Error. Page cannot be displayed. Please contact your service provider for more details." I have been tried lots but not yet get any result.




How to tell to client that Django web application is in healthy state or not (status 200)

I have written a Django web application and also supported REST API to get JSON response.

Now I want to write some health endpoint ( some url ) which is when used, my django web application should tell whether or not it is in healthy state.

Example, If my Django application is not running ( web server is down ), then if a rest api client tries accessing the health endpoint (URL) and it should get response telling application is not healthy.

On the other hand if application is running/up ( web server is up ) then accessing the health endpoint will show message that application is healthy.

Is it doable in Django ?

Thanks in advance.




How to implement voice chat in ASP.NET Core?

I am trying to create a web application in ASP.NET Core where signed in users can voice chat with other users.

There seems to be very little information and guides on how to do this, so i don't even know where to even get started. Is there a quick prototype example or a easy guide that shows how to do this?

Any thoughts, ideas or useful guide sources will be much appreciated. Thanks!




How to write a python program that runs in docker container and keeps track of all the websites visited (url and visit start time)?

I want to write a small program that keeps watching all the websites I visit (url and visit start time) on my laptop. I'm also learning Docker and I want to make it in a Docker container that's running in background.

Can someone provide some clues/hints/directions as to how do-able is this application and how to write such a program? I'm in the python world, btw.




Having trouble working with data from component to component with Angular CLI

The main issue has something to do with the fact that I'm trying to have one component interact with another. I have a list of songs and the idea is that when one song is clicked it calls a function in the "now-playing-bar" component.

Just hitting the play/Pause button calls the playPause function and that works great. The issue comes from when you click a song on the "playlist" component and it calls the function playSong in the "now-playing-bar" component. The function itself seems to work fine, the song starts to play and the data values seem to be assigned. However two errors occur.

Error 1: The html does not update to show the new title and artist.

Error 2: When clicking play/pause to pause a song played from the "playlist" component, playPause function correctly outputs this with all it's correct data fields, but outputs undefined for this.playing

Code is abbreviated for easier reading

now-playing-bar.component.html

<div class="song"></div>
<div class="artist"></div>

now-playing-bar.component.ts

export class NowPlayingBarComponent implements OnInit {
    isActive: boolean;
    progress: number = 10;
    playing: boolean;
    currentSong: Song = {
        "id": null,
        "title": "",
        "artist": "",
        "length": "",
        "fileName": ""
    };
    song: any;
    songs: Song[] = [];

    constructor(private songService : SongsService) { }

    ngOnInit() {
        this.songService.fetchData()
            .subscribe(d => this.songs = d as Song[]);
    }

    playPause() {
        console.log('Play Pause this:');
        console.log(this);
        console.log(this.playing);
        if (this.playing) {
            console.log('Its fucking playing');
            this.playing = false;
            this.song.pause();
        }
        else {
            if (!this.song) {
                this.song = new Howl({
                    src: ['assets/music/' + this.songs[0].fileName]
                });
            }
            this.currentSong = this.songs[0];
            this.playing = true;
            this.song.play();
        }
    }

    playSong(id: number) {
        let that = this;
        this.songService.fetchData()
            .subscribe(function(d) {
                if (that.playing) {
                    that.song.stop();
                    that.song.unload();
                }
                that.song = new Howl({
                    src: ['assets/music/' + d[id].fileName]
                });
                console.log(that.song)
                console.log(that)
                that.currentSong = d[id];
                that.playing = true;
                that.song.play();
            });
    }
}

playlist.component.ts

import { Component, OnInit } from '@angular/core';
import Song from "../models/Song"
import { SongsService } from "../songs.service";
import { NowPlayingBarComponent } from "../now-playing-bar/now-playing-bar.component"

export class PlaylistComponent implements OnInit {
    songs: Song[] = [];

    constructor(private songService : SongsService, private NP : NowPlayingBarComponent) { }

    ngOnInit() {
        this.songService.fetchData()
            .subscribe(d => this.songs = d as Song[]);
    }

    songClicked(id) {
        this.NP.playSong(id)
    }
}

I'm happy to upload the full code if that would help, just didn't want to make it a cluttered mess. I've spent hours researching trying to figure this out but I just can't seem to get it. My best guess is the way that the "playlist" component is interacting with the "now-playing-bar" is incorrect.




Using Google drive apis to update worksheet

I have to update a google drive worksheet without changing its id.The api documentation asks to initiate service for sheets using getsheetservice but code throws error that the method is not defined for spreadsheets.

Any idea why the error is shown? My req is simple.All i have to do is update a worksheet (not whole spreadsheet) to existing worksheet in google drive.I am using the worksheet in other worksheet uding import function,so id shld be same. Any better suggestions?




I need clues to how put a log in in my web site

Looking for advice like fonction or a specific language to create an account on a web site I had made




W3C Web Bluetooth "acceptAllDevices: true" does not return all devicies. Why?

Going by the Web Bluetooth Draft Community Group Report, 11 February 2019 https://webbluetoothcg.github.io/web-bluetooth/#example-filter-by-services

and

Web Bluetooth API https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API

The following code should return all connected bluetooth devices:

navigator.bluetooth.requestDevice({acceptAllDevices:true}).then(function(device) {
    console.log('Name: ' + device.name);
}).catch(function(error) {
    console.log("Something went wrong. " + error);
});

When I refresh my html page I see the display screen with, "http://localhost wants to pair" at the top and some devices I do not know are listed; however, other devices that clearly show up in the Windows 10 "Bluetooth & other devices" info box are not in the Web Bluetooth info box.

I am trying to create the simplest code sample possible. I am baffled as to why this does not work. Any assistance would be greatly appreciated. Thx!

And yes, Google Chrome is up to date Version 73.0.3683.86 (Official Build) (64-bit)




How would I make desktop applications similar to Boxy? [on hold]

I want to create desktop applications similar to Boxy. So basically take a current website and modify it into a lightweight desktop application with modified css and layout.




How to restrict spacebar in textarea input?

I've discovered a major security vulnerability in my website, I have a text form that uses its input as variables in a shell script. Long story short, ive determined that the simplest solution is to remove the spacebar from the text form (this form is meant for first names, so no space character is needed anyway) <input type=text required name="firstname" placeholder=" First Name" cols="30" rows="1" style="background-color:#000000;color:#FF0000;border:3px solid #FF0000;"> I need to know the easiest way to restrict the spacebar from this type of input. I have no experience with javascript or php, so I need extensive explanation on how to implement such methods to block the spacebar.




How to use Parsed XML file in HTML

I have data stored in an XML file, that I want to use to create a website (HTML file). The following is a the format of the xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE dblp SYSTEM "dblp.dtd">
<dblp>
<article mdate="2017-05-28" key="journals/acta/Saxena96">
<author>Sanjeev Saxena</author>
<title>Parallel Integer Sorting and Simulation Amongst CRCW Models. 
</title>
<pages>607-619</pages> 
<year>1996</year>
<volume>33</volume>
<journal>Acta Inf.</journal>
<number>7</number>
<url>db/journals/acta/acta33.html#Saxena96</url>
<ee>https://doi.org/10.1007/BF03036466</ee>
</article> 

I am following a tutorial on using SAX parser with JAVA in order to parse the XML file, where in the end I collect all the authors in a list or so. However I don't understand once I parse the XML file how will I use it in HTML in order to create a page where I display the names of the authors and so on. PS: My XML file is large (2.3 GB). I am new to web development so I really appreciate your help.




How to add working Chat in localhost website

i am making website. chat box is needed for communication between two or more user

i search lots of example but most of developer told me to use Widget

I want Chat box Without using any widget




When to use Xml Serialization

Which series of XML namespaces will You use to serialize an object to XML using WCF?

For example, I have 4 types of Users (left to right) and they have data and references to members in my Users table. This way I could 1/2 have to remove functions and 2 methods because I do not have add/delete methods.

So to end up with code like

public void Save() {
microsoft.Office.Interop.Excel.Application, System.Application.Current.People, System.Runtime.Interop.Microsoft.Office.Interop.Outlook.Application,
    Microsoft.Office.Interop.Outlook.Application,
    Microsoft.Office.Interop.Excel.Application,
    Microsoft.Office.Interop.Excel.Application,
    Microsoft.Office.Interop.Outlook.
Microsoft.Office.Interop.Outlook,
    Microsoft.Office.Interop.Contact,
    Microsoft.Office.Interop.Outlook.
//General methods 
}

It makes sense to me for someone to add the notes this method requires but that would allow me to have 2 methods.

Save a new class and create the form to save the new class Write at least one file, Save or Open for reading? Add a button about saving the file but then the form with some properties that the functionality should be saved to? Is this the same? Or is there a better way?

Thanks!




Interactive IDA like grapths for web

I'm trying to find a library that can draw interactive IDA like graphs image example https://mk0resourcesinfm536w.kinstacdn.com/wp-content/uploads/022113_0209_ReversingLo4.png

As you can see it's kinda like a Org Chart, but since "code blocks" can link to other "code blocks" that are at a higher level, I would say it's closer to a flowchart.

A key feature I need is that the graph is intractable, I want the content of each "code block" to contain input tags so the user can change the value in the code blocks. In other words I don't want a static image of a graph.

What I have tried: I was hoping graphviz could help me, it can output SVG, but I can't find a way to make it intractable so that I can add input tags.

gojs seemed promising, but have a watermark that I don't like. It is however seems to be a good example of what I am looking for. See here https://gojs.net/latest/samples/flowchart.html (the watermark is only visible if you download the code from github (bottom of the example page)).

Also, it loads data from json, I would want to rather use code objects. So I can create a node with node(info) and create a edge between two nodes with something like edges(A, B). (like graphviz)




PHP or Node.js which is better for Backend?

I am moving in Backend but i am confused about choosing for Node.js or PHP. Which is better for a Backend developer/ Full Stack Developer? please let me know about your openion and why you prefer your language?




SVG position moving on page rescale

I'm currently coding a website for a uni project and rather than just using the conventional shapes. I thought I'd try using SVGs to make custom shapes, but the only issue I'm currently having is that I cant get one of the SVG paths to be fixed when rescaling the page where as the other is.

I have tried to set the positioning of the SVG path by px and percentage but none of that seems to work. I have also tried setting the paths position to fixed. Image of the site before scale Image of rescale

SVG Code

<div id="midWrapper">
    <!--Middle container SVG as it is a custom shape-->
    <div id="containerMiddle">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 980 590"><title>Custom shaped rectangle with corner missin</title><path d="M766.29,13.57,967.43,214.71A46.32,46.32,0,0,1,981,247.47V544.68A46.32,46.32,0,0,1,934.68,591H46.32A46.32,46.32,0,0,1,0,544.68V46.32A46.32,46.32,0,0,1,46.32,0H733.53A46.32,46.32,0,0,1,766.29,13.57Z" style="fill:#5f1742; pointer-events: none;"/></svg>
    </div>

    <!--Top right corner of the middle container, used as a link to call pendle burton-->
    <div id="contactTriangle">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 185.99 185.99"><title>Phone Icon in a Triangle used to call the restaurant</title>
            <path d="M186,9.92V176.05a9.92,9.92,0,0,1-16.93,7L2.93,16.93A9.92,9.92,0,0,1,9.94,0H176.07A9.92,9.92,0,0,1,186,9.92Z" style="fill:#fff"/>
            <path d="M129.27,80.74a3,3,0,0,1-.14,2.54c-1.36,2.2-3,4.24-4.44,6.36-1.94,2.79-2.38,5.58-.64,8.76,3,5.56,5.82,11.26,8.71,16.9,1.8,3.49,5.12,5.07,8.43,3A132.31,132.31,0,0,0,155.11,108c2.38-1.94,2-5,1.76-7.79-.58-7.44-3.2-14.31-6.75-20.73-10.86-19.59-24.34-37.06-42.84-50.07-4.06-2.86-9.06-4.42-13.71-6.38a7,7,0,0,0-7.32,1.31,124.44,124.44,0,0,0-11,9.71C72,37.36,72.55,41,76.09,44,81,48.05,85.88,52,90.64,56.23a7.06,7.06,0,0,0,7.93,1.31c2.91-1.14,5.77-2.38,9-3.71A141.83,141.83,0,0,1,129.27,80.74Z" style="fill:#5f1742"/>
            <path d="M107.56,53.83a141.83,141.83,0,0,1,21.71,26.91,3,3,0,0,1-.14,2.54c-1.36,2.2-3,4.24-4.44,6.36-1.94,2.79-2.38,5.58-.64,8.76,3,5.56,5.82,11.26,8.71,16.9,1.8,3.49,5.12,5.07,8.43,3A132.31,132.31,0,0,0,155.11,108c2.38-1.94,2-5,1.76-7.79-.58-7.44-3.2-14.31-6.75-20.73-10.86-19.59-24.34-37.06-42.84-50.07-4.06-2.86-9.06-4.42-13.71-6.38a7,7,0,0,0-7.32,1.31,124.44,124.44,0,0,0-11,9.71C72,37.36,72.55,41,76.09,44,81,48.05,85.88,52,90.64,56.23a7.06,7.06,0,0,0,7.93,1.31C101.48,56.4,104.34,55.16,107.56,53.83Z" style="fill:#5f1742"/>
        </svg>
    </div>
</div><!--Closing tag for SVG-->

All styling for elements

#containerMiddle{
width: 980px;
height: 590px;
margin-top: 60px;
pointer-events: none;
margin-left: auto;
margin-right: auto;
}

#contactTriangle{
width: 185px;
height: 185px;
pointer-events: none;
margin-left: 66%;
margin-top: -31%;
}

Any suggestion on how to improve this site so the triangle stays in place and increase the responsiveness of the site would be greatly appreciated.




Check for Https

is there any way or any code available in python or java to find website contain any ssl certificate or not

all I need to write small program that check website hold any https secure layer or not so let me know there any inbuild library or module available in python or java




How do I hide my code from developer tools? [duplicate]

This question already has an answer here:

I am about to make a simple web-based game. The players will receive monetary prizes if they win.

I am however afraid that someone might read my code from the developer's tool and understand the logic behind the game. This might lead to financial loss to me. How do I prevent this from happening?

How do I ensure that my code will not be available in the developer's tools in the browsers?




Developing an app which takes data from website and Display it

I want to develop an android app which takes the data from a website and displays it on the app also the data(numbers mostly) in the website changes daily but i do not know how to take the data from the website, do i need to store the data in a database before displaying it i searched the internet but there are no tutorials available on this so please help.

thanks




Import/convert highcharts object from web page

I would like (if possible) to convert a Highcharts stockchart from a web page into my C# application where I can extract the data series.

Example: To read out all series values from this stock graph: https://www.di.se/bors/aktier/azn/

Completely new to web programming and Highcharts!




samedi 30 mars 2019

When I try to use jQuery to update the html DOM

When I try to use jQuery to update the html DOM, the imformation is too long to display in a screen, but I cannot slide it down. This is my code:

window.onload = async function()
{
    $ = layui.$;
    let formcode=await eel.getForm()();
    $("#data").html(formcode);
    document.getElementById("data").innerHTML=formcode;
}

And this is my screenshot: enter image description here




What is the deployment procedure of a Django Web application?

I am trying to build an Online Judge using Django Framework where users can submit their code against some problems and they will be accepted if the output of their code matches the correct ones. In that case, I have to access the command line programmatically to run the submitted codes. I need to know if I can do that and also if I can, what is the deployment procedure?




How do I join the normal (horizontal) and rotated lines end at the same point in HTML and CSS?

To make a thigh, leg and ankle like structure as thick lines. I should rotate it using animation, but they are rotating in the manner such that they are at different points. But I want the joints between the lines should be the same as the knee joint, hip joint.

I have included the code that I tried.

<title> Stick Animation </title>

<style>
    body {
        font-family: monospace;
        align-content: center;
        text-align: center;
        padding: 20px;
        padding-top: 200px;
    }


    .thigh {
        height: 5px;
        width: 200px;
        position: relative;
        background-color: black;
        display: inline-block;
        transform-origin: right;
        animation-name: leg;
        animation-duration: 1s;
        animation-iteration-count: 10;
        animation-direction: alternate-reverse;
    }

    @keyframes thigh {
        from {
            transform: rotate(120deg);
        }

        to {
            transform: rotate(100deg);
        }
    }

    .leg {
        height: 5px;
        width: 170px;
        position: relative;
        background-color: black;
        display: inline-block;
        transform-origin: left;
        animation-name: leg;
        animation-duration: 1s;
        animation-iteration-count: 10;
        animation-direction: alternate-reverse;
    }

    @keyframes leg {
        from {
            transform: rotate(120deg);
        }

        to {
            transform: rotate(0deg);
        }
    }

    .ankle {
        height: 5px;
        width: 50px;
        position: relative;
        background-color: black;
        display: inline-block;
        transform-origin: left;
        animation-name: ankle;
        animation-duration: 1s;
        animation-iteration-count: 10;
        animation-direction: alternate-reverse;
    }

    @keyframes ankle {
        from {
            transform: rotate(60deg);
        }

        to {
            transform: rotate(0deg);
        }
    }

</style>

<div class="thigh"> </div>
<div class="leg"> </div>
<div class="ankle"> </div>

I want the thigh, leg and ankle should be connected as joints and it should rotate accordingly. This image is my output




How to get zip file names hierarchy in asp.net core webapi angular7

I want to get zip items names hierarchy to string in asp.net core webapi angular7. If anyone know how to do this, please help me.

Thanks Amila




Git like functionality in web application using python

I have to create a website like mmyweb.com now I want to add a functionlity like "I can initiate a new project and I can allow more then one developer to add his code in it".So website will let them push and pull so I have to keep track of code .And then I can even clone that code in any web server as well . like myweb.com/firstproject

I have searched but didnt get any exact idea or any third party module or open source functionality for this




Modify and host JSLinux

I need to embed Fabrice Bellard's JSLinux in my own website and also add some folders on startup, therefore an iframe is not an option. How am I able to include it and modify it?




sending http requests from client to server inside heroku platform

My app is using angular in the client and nodejs as the backend, but I have some problem to configure them properly in production on heroku.

In development I run my nodejs server on port 3000 and send all the http requests from the angular client to http://localhost:3000 and its works very well. but when I deploy my nodejs server with my angular client files under the dist directory, heroku lifts the server on random port and all my http requests to http://localhost:3000 failed. how I can determine the node port on heroku or how I can get it in my angular client?

Code on server:

let port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
const server = http.createServer(app);
server.listen(port, () => console.log('app listening on port ' 
+ port));
server.on('error', onError);
server.on('listening', onListening);

Code on client:

export const environment = {
  production: true,
  serverUrl: 'http://localhost:3000'
};




How to set Angular header value in localstorage?

saveStudentDetails(values) {
  const studentData = {};

  studentData['id'] =  values.id;
  studentData['password'] =  values.password;

  this.crudService.loginstudent(studentData).subscribe(result => {
    // Here should be the value of the header from backend to be store on localstorage
    this.toastr.success('You are logged in', 'Success !', { positionClass: 'toast-bottom-right' });
    this.router.navigate(['/address']);
  },
    err => {
      console.log('status code ->' + err.status);
      this.toastr.error('Please try again', 'Error !', { positionClass: 'toast-bottom-right' });
 });

I have a JWT token that has been sent from backend when the user logged in into the system, how can i set the token from the header into localstorage? Thank you very much.




vendredi 29 mars 2019

How to process the HTTP get request in c?

I am learning sockets and I wrote a simple web server program in C, When I use my web browser to send the get request like this "170.160.1.11:5000/media" I get the request in server like the following GET /media HTTP/1.1 Host:170.160.1.11:5000.. So my question is how to extract that "media" from the first line? Is there any function in c to break down the HTTP request?

Thanks in advance




sending http requests from client to server inside heroku

My app is using nodejs in the backend and angular as the client, but I have some problem to configure them properly in production on heroku.

In development I run my nodejs server on port 3000 and send all the http requests from the angular client to http://localhost:3000 and its works very well. but when I deploy my nodejs server with my angular client files under the dist directory, heroku lifts the server on random port and all my http requests to http://localhost:3000 failed. how I can determine the node port on heroku or how I can get it in my angular client?

Code on server:

let port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
const server = http.createServer(app);
server.listen(port, () => console.log('app listening on port ' 
+ port));
server.on('error', onError);
server.on('listening', onListening);

Code on client:

export const environment = {
  production: true,
  serverUrl: 'http://localhost:3000'
};




What are the best ways to avoid front-end debugging when doing web development?

I'm coming back to web development after a long break of 8 years. Needless to say, a lot has changed.

I'm planning to start a new web dev project and want to choose swift as a server side language. Regardless of which server side language is chosen, eventually the front end code will have to be generated (html/css/js).

And debugging will be required from the front end which is the part of web development that I loath.

Are there ways where I can minimize front end development/debugging as much as possible and focus just on the server side?




Recommend a flexible web page builder?

First of all, I want to tell you that I am not a web developer or expert. Last time, I just made a website via WordPress by following online tutorials, but I wasn't much satisfied with the design and page setting.

Recently, I bought a domain and hosting but I didn't apply for WP this time because I don't like its templates and it is hard to make changes there. Therefore, I am looking for some easy to use drag-and-drop kind of web page builders. I have one option of Wix, but I don't know how much they would charge. Similarly, someone has also suggested me this free drag-and-drop website builder at a platform pinpage.com, but I don't know how it would work in the case to give professional news look to the site.

I only have experience of using SimpleSite web page builder, but I become hard to edit sometimes there.

So, what are your suggestions in this regard? What do you think which web page builder would be convenient to easy for a non-technical person?

Note: My site would be about reviews and news. And I am impressed by the web designs of Guardian and Top Review sites.




Need to create SQL Injection flaw

I have an assignment to add an SQL injection flaw to a web application, and I'm hoping someone can give me a nudge in the right direction that doesn't involve rewriting the whole program.

Here's the code where most of the work is done:

package todolist;

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

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.query.Query;

public class DAOImp implements ItemListDAO {

    @Override
    public void addItem(String itemStr) {
        ListItem item = new ListItem(itemStr);
        Session session = HibernateUtil.getSessionFactory().openSession();
        Transaction tx = null;
        Integer itemID = null;
        try {
            tx = session.beginTransaction();
            itemID = ((Integer) session.save(item));
            tx.commit();
        } catch (HibernateException e) {
            if (tx != null)
                tx.rollback();
            e.printStackTrace();
        } finally {
            session.close();
        }   
    }

    @Override
    public void delItem(int itemNbr) {
        Session session = HibernateUtil.getSessionFactory().openSession();      
        Transaction tx = null;
        ListItem item2 = session.get(ListItem.class, itemNbr);
        try {
            tx = session.beginTransaction();
            session.delete(item2);
            tx.commit();
        } catch (HibernateException e) {
            if (tx != null)
                tx.rollback();
            e.printStackTrace();
        } finally {
            session.close();
        }
    }

    @Override
    public List<ListItem> getList() {
        List<ListItem> list = new ArrayList<>();
        Session session = HibernateUtil.getSessionFactory().openSession();
        Transaction tx = null;
        try {
            tx = session.beginTransaction();
            Query<ListItem> queryList = session.createQuery("FROM ListItem");
            list = queryList.list();
            tx.commit();
        } catch (HibernateException e) {
            if (tx != null)
                tx.rollback();
            e.printStackTrace();
        } finally {
            session.close();
        }
        return list;
    }

}

As I'm creating an object that is then transferred to the database, I'm not sure how exactly to create the injection flaw, or whether it would be easier to do it in the add or delete sections. Any help is appreciated and any additional information you might need, I would be happy to provide.




How to solve the problem of Lenght in JSON String

Error image in localhost

Picture error

My application isn't suporting the data volume returned. So, I checked if it would work normally if the default limit was reached in the file "web.config". But it did not wotk!

How I can to solve this problem with other way?




How to acess javascript-based dialog window in web page with Windows Powershell?

I'm accessing an old web page, poorly scripted, with poorly identified elements. Until now, I could access all objects it gave me. But now, I'm stucked.

When I click this button, it opens a JavaScript dialog, in which the user must insert some values. And I just click at it. But when the window opens, I just can't focus at it.

This is the code that creates it:

<INPUT onclick="javascript: openCosts(document.forms[0], 'COMPANY');" 
title="Include values" 
style="BORDER-LEFT-WIDTH: 1px; CURSOR: hand; FONT-SIZE: 11px; FONT-FAMILY: Tahoma; BORDER-RIGHT-WIDTH: 1px; 
BORDER-TOP-COLOR: #007041; BORDER-BOTTOM-WIDTH: 1px; BORDER-LEFT-COLOR: #007041; FONT-WEIGHT: bold; 
COLOR: #fff; PADDING-BOTTOM: 1px; BORDER-BOTTOM-COLOR: #007041; PADDING-TOP: 1px; PADDING-LEFT: 3px; 
BORDER-RIGHT-COLOR: #007041; PADDING-RIGHT: 3px; BORDER-TOP-WIDTH: 1px; BACKGROUND-COLOR: #0080ff" 
type=button value="Costs - SAP" name=btn_show_costs></INPUT>

I tried to send TABS and ENTERS; tried to get all open IExplorer open windows -- $shell = New-Object -ComObject Shell.Application and Get-Process | Where-Object ... doesn't work.

Can somebody help me??

Thank you in advance!




How browser displays a static website contents without any confusion, when two requests are fired from a browser in different tabs

I'm a web developer, I just want to know how things work behind the scenes when a request is fired.

Suppose let's assume I've a static website, I requested about us page in one tab, contact us in other tab, both the requests are fired at the same time..

when the requests are fired at the same time, How browser displays the content in respective tabs correctly ?

Thanks in advance..




Android seems drop event from bluetooth communication

I'm new in Android world, WebApp and also in bluetooth. I need to develop a web app that connect with a device that sends data at 256hz. For the bluetooth communication I use bluetooth web api released from google. I have 5 characteristics that notify me when value change and I know that the notification come in a certainly order. When my app works on a pc everything is ok but when I run my app on a android chrome browser seems that the app drop some packets. I know that android spread events on the system and every app has an event queue to recive and use that events. It is possible that app event queue can't contain so match event?




How to create a meta description with categories?

I want my page metadescription that is shown in the google search to have opcions or categories like the ones in the fotograph. Does anyone know how to do it?

me gustaría que la descripción de mi pagina que se muestra en el buscador tenga opciones o categorías como las de la siguiente fotografía, y me preguntaba si alguno sabe como se hace.

this is the result I am looking for.




When making the staging site go live, can you simply change the folder names in FTP?

I have a staging site called: stg.website.com

I want to make this version of the site my live version now.

In FTP, I have 2 folders

1) stg.website.com

2) www.website.com

Why can't I just switch the 2 folders to make the staging site go live?




Best way to develop web site and mobile app (native)

I would develop a web site and a corresponding application (native language for Android and iOS, NO react or another hybrid solution) and I have thought to use Ruby On Rails for Web site with JSON endpoint for Android/iOS application. Is it a good solution? Any suggestions? Thanks for your time.




How to generate and send temoprarily valid message in TCP socket to trigger a task?

I have written a program which trigger some task in it when it got a particular message(let's say "task1") in it's TCP server socket. actually i don't want to trigger by the same message, because someone who connect to this device can trigger the task. I can encrypt the message and i also encrypt using AES-CBC mode. okey.. i got different message but the different messages can also trigger the task (if someone got the encrypted message can trigger the task by sending the same message)....

my goal: triggering the task by different temporarily valid message.

What i have done:

1) First, i communicate the two device in (AES-CBC encrypted). in this communication i share a temporary '(a salt)',{salt is generated from UUID}. this salt is store in a variable.

2). Secondly, when they got the salt, the tcp cleint add the server's salt to it messages and then encrypt the message and send back to the server

3). Third, the tcp server decrypted the message and check the salt is valid or not(by checking in its variable). if the salt is valid, the task is trigger, if not the task not trigger.the salt is also removed from the variable

in this whole process the every message is not same. so even a hacker grab a peice of message, he will not able to trigger the task by sending the same messsage(let's assume he don't know the AES encryption key)

I am happy with my logic. but the problem is that it is very lengthy and i sometime feels i am re inventing wheel. So if there is some better way or better library please suggest me.




Webpack Config Found No Entry Configured

I am having some trouble with using Webpack on my Ruby on Rails project. I am following the tutorial series on WebCrunch (https://web-crunch.com/lets-build-with-ruby-on-rails-project-management-app/). When I try run webpack-dev-server I receive the following error:

No configuration file found and no entry configured via CLI option. When using the CLI you need to provide at least two arguments: entry and output. A configuration file could be named 'webpack.config.js' in the current directory. Use --help to display the CLI options.

So instead I run webpack-dev-server --config config/webpacker.yml and I receive this error:

Configuration file found but no entry configured. Use --help to display the CLI options.

Attached is my webpacker.yml file and also my package.json. I am also going to attach a screenshot of the project directory.

Webpack screenshot

webpacker.yml

# Note: You must restart bin/webpack-dev-server for changes to take effect

default: &default
  source_path: app/javascript
  source_entry_path: packs
  public_output_path: packs
  cache_path: tmp/cache/webpacker

  # Additional paths webpack should lookup modules
  # ['app/assets', 'engine/foo/app/assets']
  resolved_paths: []

  # Reload manifest.json on all requests so we reload latest compiled packs
  cache_manifest: false

  extensions:
    - .coffee
    - .erb
    - .js
    - .jsx
    - .ts
    - .vue
    - .sass
    - .scss
    - .css
    - .png
    - .svg
    - .gif
    - .jpeg
    - .jpg

development:
  <<: *default
  compile: true

  # Reference: https://webpack.js.org/configuration/dev-server/
  dev_server:
    https: false
    host: localhost
    port: 3035
    public: localhost:3035
    hmr: false
    # Inline should be set to true if using HMR
    inline: true
    overlay: true
    compress: true
    disable_host_check: true
    use_local_ip: false
    quiet: false
    headers:
      'Access-Control-Allow-Origin': '*'
    watch_options:
      ignored: /node_modules/


test:
  <<: *default
  compile: true

  # Compile test packs to a separate directory
  public_output_path: packs-test

production:
  <<: *default

  # Production depends on precompilation of packs prior to booting for performance.
  compile: false

  # Cache manifest.json for performance
  cache_manifest: true

package.json

{
  "name": "Groupie",
  "private": true,
  "dependencies": {
    "@rails/webpacker": "^3.2.0",
    "coffeescript": "1.12.7",
    "require-yaml": "0.0.1",
    "rvm": "^0.3.2",
    "vue": "^2.6.10",
    "vue-loader": "^15.7.0",
    "vue-template-compiler": "^2.6.10",
    "webpack": "^2.2.0",
    "webpack-dev-server": "^2.10.1"
  },
  "devDependencies": {}
}




Rewriting a HTML file to exclude ActiveX objects

I am rewriting an application that is using alot of ActiveX objects throughout the code, and my goal is to rewrite the application to get rid of all ActiveX objects, and make the project client/server architecture using Java Spring.

I am basically stuck on how to delete the code using ActiveX objects in this file, and writing it in java instead.

<!DOCTYPE html>
<html>
<head>
<title>Velkommen</title>

<script type="text/javascript">

var message="Højreklik er ikke tilladt her."; 
function clickIE() {if (document.all) {(message);return false;}} 
function clickNS(e) {
    if(document.layers||(document.getElementById&&!document.all)) { 
        if (e.which==2||e.which==3) {(message);return false;}
    }
} 

if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else{
    document.onmouseup=clickNS;document.oncontextmenu=clickIE;
} 
document.oncontextmenu=new Function("return false") 

//var strConn_ORA_SCDRIFT = 'Provider=OraOLEDB.Oracle;Data Source=CTIRP;User Id=SC_DRIFT;Password=DRIFTSC;';    
var today=new Date()
var sql_today=""
var notification=""

function getBirthdays(){

    sql_today= today.toString("ddMM")//""+dd+""+dm

    var rs = new ActiveXObject("ADODB.Recordset");
    conn.Open(strConn_ORA_SCDRIFT);

    var SQL="SELECT SAF1.INITIALER , SAF1.MED_STEDKODE_ID , SAF1.FORNAVN , SAF1.EFTERNAVN , SAF.FUNKTIONSNAVN FROM SC_DRIFT.SAFE_SYS_MED_ANS_FUNKTION SAF, SC_DRIFT.SAFE_DATA_MEDARBEJDER SAF1 WHERE SAF.ANS_FUNKTIONS_ID=SAF1.FUNKTION AND SAF1.MED_STEDKODE_ID = '"+loggedInUser.Stedkode+"' AND SAF1.STATUS = 1 AND SUBSTR(SAF1.BIRTHDAY,1,4) = '"+sql_today+"' ORDER BY SAF.FUNKTIONSNAVN"

    rs.Open(SQL, conn);

    if(rs.eof == true){
        notification="Ingen nyheder i dag"
    }else{
        notification = "<ul>"
        while (rs.eof != true)
        {
            notification = notification +"<br>"+" <li>"+rs("FUNKTIONSNAVN")+" "+rs("FORNAVN")+" "+rs("EFTERNAVN")+" ("+rs("INITIALER")+") fra dit team har f&oslash;dseldag.<br>"
            rs.moveNext();
            notification = notification +"<br>"
            document.getElementById('info').innerHTML=notification
        }
        notification += "</ul>"
    }
    conn.Close();

}

function getMissingInfo() {

    var targetDiv = document.getElementById('info');

    var SQL = "Select * from SC_DRIFT.SAFE_DATA_MEDARBEJDER where INITIALER= '"+loggedInUser.Init+"'"

    var rs = new ActiveXObject("ADODB.Recordset");
    conn.Open(strConn_ORA_SCDRIFT);
    rs.Open(SQL, conn);
    while (rs.eof != true)
    {
        var birthDay = ""+rs("BIRTHDAY");
        var mobil = ""+rs("MOBILTELEFON");
        var adresse = ""+rs("ADRESSE");
        var mail = ""+rs("MAILADRESSE");
        var uddId = ""+rs("UDDANNELSERID");
        var uddStart = ""+rs("UDD_START");
        var uddSlut = ""+rs("UDD_SLUT");
        var madvalg = ""+rs("MADVALG");

        rs.moveNext();  
    }
    conn.Close();
    missingInfo = [];

    if(birthDay == "0000000000" || birthDay == 'null'){
        missingInfo.push("Fødselsdag")
    }
    if(mobil == 'null'){
        missingInfo.push("Mobiltelefon")
    }
    substring = "Ukendt";
    if(adresse == 'null' || adresse.indexOf(substring) > -1){
        missingInfo.push("Adresse")
    }
    if(mail == 'null'){
        missingInfo.push("Email")
    }
    if(uddId == 1 || uddId == 100 || uddId == 0){
        missingInfo.push("Uddannelse")
    }
    if(uddStart == 'null'){
        missingInfo.push("Uddannelse Start")
    }
    if(uddSlut == 'null'){
        missingInfo.push("Uddannelse Slut")
    }
    if(madvalg == 'null'){
        missingInfo.push("Madvalg")
    }
    if(missingInfo.length > 0){

        if(targetDiv.innerHTML == "Ingen info pt."){
            targetDiv.innerHTML = "";
        }
        var missingInfoLabel = document.createElement("div");
        missingInfoLabel.innerHTML = "<br />De f&oslash;lgende info mangler at blive indtastet"
        targetDiv.appendChild(missingInfoLabel);

        var missingInfoTable = document.createElement("div");
        var ul = document.createElement("ul");
        for(i = 0; i < missingInfo.length; i++){
            var li = document.createElement("li");
            li.innerHTML = missingInfo[i];
            li.className = "missingInfoLi";
            li.addEventListener("click", function (){document.getElementById("87_subPageId").click();}); 
            ul.appendChild(li);
        }
        missingInfoTable.appendChild(ul);
        targetDiv.appendChild(missingInfoTable);
    }

}

function getLeaderVacationNotify() {


    var targetDiv = document.getElementById('leaderVacationInfo');

    var SQL = "select distinct INITIALER, min(VAGT_DATO) FRA_DATO,max(VAGT_DATO) TIL_DATO from( Select * from SC_DRIFT.SAFE_DATA_VAGTPLAN where VACATION_ID in(2,3) and AKTIVITET_ID not in(54,15) and STEDKODE_ID="+loggedInUser.Stedkode+" and VAGT_DATO between  trunc(sysdate) and sysdate+90 and DELETED=0) group by INITIALER" //godkendt, men ikke accepteret samt anmodet ferie
    var rs = new ActiveXObject("ADODB.Recordset");
    conn.Open(strConn_ORA_SCDRIFT);
    rs.Open(SQL, conn);
    var vacationInit = [];
    var vacationDates = [];
    while (rs.eof != true)
    {
        var init = ""+rs("INITIALER");
        var dates = new Date(""+rs("FRA_DATO")).toString('dd-MM-yyyy')+ " til "+ new Date(""+rs("TIL_DATO")).toString('dd-MM-yyyy')
        vacationInit.push(init)
        vacationDates.push(dates)
        rs.moveNext();  
    }
    conn.Close();

    if(vacationInit.length > 0){

        if(targetDiv.innerHTML == "Ingen info pt."){
            targetDiv.innerHTML = "";
        }
        var vacationInfoLabel = document.createElement("div");
        vacationInfoLabel.innerHTML = "<br />De f&oslash;lgende initialer har udestående ferieønsker:"
        targetDiv.appendChild(vacationInfoLabel);

        var vacationInfoTable = document.createElement("div");
        var ul = document.createElement("ul");
        for(i = 0; i < vacationInit.length; i++){
            var li = document.createElement("li");
            li.innerHTML = vacationInit[i]+ " ("+vacationDates[i]+")";
            ul.appendChild(li);
        }
        vacationInfoTable.appendChild(ul);
        targetDiv.appendChild(vacationInfoTable);
    }
    //alert("done vaca")
}


</script>
</head>

<body>
    <div id="welcomePage">
        <p><img alt="Safe 4.0" src="pics/logo3.jpg"></p>
        <br />
        <br />
        <div class="overskrift_info" id="husk">Info:</div>
        <div class="tekst" id="info">Ingen info pt.</div>
        <br><div class="tekst" id="leaderVacationInfo"></div>
    </div>
<script>


</script>
</body>
</html>




Deploying php app with XAMPP on localhost

Environment: Windows 10.

I need to deploy a PHP app on my localhost. For this purpose, I have installed XAMPP following this tutorial.

After setting up XAMPP, For testing purposes, I created the folder "app002" at "XAMPP\htdocs" directory. I have put "index.php" file inside it, which contains the following code.

    <html>
<head><h1>First Programm</h1>
</head>

<body>
    <?php
        print "Runing my first programm in PHP."
    ?>
</body>
</html>

After this when I opened my Chrome browser and enter "localhost/app002/" into the address bar it shows me "Runing my first programm in PHP." inscription so everything is okay.

After that, I created a new folder "app001" at "XAMPP\htdocs" directory. But when I enter "localhost/app002/" I see this error 404.

Inside app001 folder index.php script contains code without any HTML tags.

Here is the app.




How to handle this migration error in laravel?

I am working in a restaurant system and I am adding a table to the database and have a problem with create_menus_table I think the problem is in the relations between tables but I can't find it.

I tried to delete all of them and made models again and checked whether the error in the tables or not and delete the database and delete all modules

the error in cmd

**Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 (SQL: alter table menus add constraint menus_user_id_foreign foreign key (user_id) references users ()) at C:\xampp\htdocs\laravelrestaurantapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668| Exception trace: 1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1") C:\xampp\htdocs\laravelrestaurantapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:452 2 PDO::prepare("alter table menus add constraint menus_user_id_foreign foreign key (user_id) references users ()") C:\xampp\htdocs\laravelrestaurantapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:452 Please use the argument -v to see more details.**

the menus table

    <?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menus', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->unique();
            $table->string('type');
            $table->text('description');
            $table->boolean('status');
            $table->string('image');
        // to make relation with the users table as the menu has several users
        // as one to many relationship
        $table->integer('user_id')->unsigned();
        $table->foreign('user_id')->reference('id')->on('users');

        $table->timestamps();
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::drop('menus');
}

}




Use Spark in an existing application

Can we integrate spark larval in the already created application?

We have created a website using stripe payment and now we need to create admin panel as well. Can we integrate Spark in admin panel now? And how it will interact with the website?




Which web technologies should I use to build a Job Email Alert system?

I want to create a website that allows users to subscribe to job alert emails. The website will have a database of jobs and a user can sign up to be alerted to new specific types of jobs, for example 'Window Cleaner'. I am looking for suggestions on how this could be achieved, which web technologies I could use, etc.




How to override HttpServletRequest toString method?

I'm using Servlet based web application and want to have proper logging support. I'm using Log4j and when I do receive any requests I want to log it with it's whole properties.

For example:

@WebServlet(name = "Login", value = "/Login")
public class Login extends HttpServlet {
final static Logger logger = Logger.getLogger(Login.class);

@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    logger.info(req); // I want to log request with its 
     // properties: such as request parameters, headers and so on
    // TODO some logic here
}

}

So, how can I mange to override somehow HttpServletRequests toString() method which actually is an interface. Is it good idea to create Wrapper class for it and there I can override toString() method ?




How do I change the route provided to me by the directions API on web?

I don't know how to change the route manually provided to me by the route of the directions API.

I've been browsing the net for a while now and I haven't searched anything yet.

How will I manually change the route provided to me by the directions API? For example, If there is a traffic within the route, I want to change the route to avoid that traffic.




jeudi 28 mars 2019

How can i filter

I'm developing an app that i need to show an string to user that's filtered with * !

let me explain it more!

we have "Password" as string that user will see with 8 letter length! so i should filter 80% of this word then show the result like this : "pa*****d"

how can i do it with PHP?




DomComplete sometimes show zero in React componentDidMount

I have a react App and want to store the performance data in an object.

I try to collect the data in the react componentDidMount in App.tsx.

interface INavigationPerformanceEntry
  extends PerformanceEntry,
    PerformanceNavigationTiming {
}

document.addEventListener("load", () => {
  setTimeout(() => {
    const entry: INavigationPerformanceEntry = window.performance.getEntriesByType(
      "navigation"
    )[0] as INavigationPerformanceEntry;
    console.log("entry", entry);
    console.log("complete", entry.domComplete);
  }, 1000);
});

And my App component is render in other indexApp.tsx

const app = (
  <Provider store={configuredStore}>
    <HashRouter>
      <App />
    </HashRouter>
  </Provider>
);
ReactDOM.render(app, document.getElementById("app"));

The domcomplete sometimes show the value is 0 and I don't know why it happens since my normal domcomplete is about 5XX ms.

I also check the navigation timeline to call setTimeout on "load" event and react componentDidMount timing.




Parenta control iOS and Android

I would like to know if it is possible to do something similar to a parental control in iOS and Android where you can basically avoid or know when a user enters adult material in the browser inside your device.

Yes, this is possible, someone has documentation or examples I would appreciate it




Reading server-side files using Blazor

I have a project based on the Blazor sample with a .Client, .Server and .Shared projects. I have a textfile data.txt on the server that I want to be able to read/write using standard StreamReader / System.IO.File methods. Since Blazor runs in a sandbox I guess I can't access the entire filesystem as I would in a normal windows app? I've placed the file in the wwwroot directory, and I can even access the file from the client if a enter url/data.txt in the browser so the file gets served, which I don't want to alow, but trying to read that file as such:

var file = File.ReadAllText("data.txt");

Results in the error:

WASM: [System.IO.FileNotFoundException] Could not find file "/data.txt"

How can I read server-side files and keep them hidden from the client?




Hosting Google Cloud App IP address on personal webpage

I have setup a shiny server on Google Cloud and have it up and running: http://35.185.99.146:3838/AppTwo/

I would like to be able to host this on my personal website as some new pages. I have the html stored on GitHub.

*Please note, the personal website is learning for HTML, I have basically no knowledge in that area and I am not sure if this even the right question to ask regarding this.

TL;DR: Get http://35.185.99.146:3838/AppTwo/ to mywebsite.com/app1




How to get the values from the form to my php segment? My code does not get the submit button

I have a form which takes the data from users and send it to php but the issue is when submit button is clicked, the php segment does not recognizes it. What is the mistake I am doing? Any help would be appreciated.

I have written this code just check it..

    <ul id="progressbar">
      <li class="active">About</li>
      <li>Details</li>
      <li>Submission</li>
    </ul>

    <fieldset class="first">
      <!-- <h2 class="fs-title">SignIn</h2> -->
      <h3 class="fsf-subtitle">About Blood-Camp</h3><br>
      <input type="text" name="email" placeholder="Contact Email" required/>
      <input type="text" name="number" placeholder="Contact Number" required/>
      <input type="text" name="name" placeholder="Contact Person Name" required/>
      <input type="button" name="next" class="next firstbutton action-button" value="Next" />
    </fieldset>
    <fieldset class="second">
      <!-- <h2 class="fs-title">Topic</h2> -->
      <h3 class="fsf-subtitle">Details about Blood-Camp</h3><br>
      <input type="text" name="city" placeholder="City" required/>
      <input type="text" name="address" placeholder="Address" required/>
      <input type="text" name="date" placeholder="Date" required/>
      <input type="text" name="time" placeholder="Timing" required/>

      <input type="button" name="previous" class="previous action-button" value="Previous" />
      <input type="submit" name="submit" class="next secondbutton action-button" value="Submit" />
    </fieldset>

    <fieldset class="third">
      <!-- <h2 class="fs-title">Topic</h2> -->
      <h3 class="fsf-subtitle">Thank You:)</h3><br><hr><br>
      <h4> Organization Name:-</h4><br>
      <h4> Contact No:-</h4><br>
      <h4> Email:-</h4><br>
      <h4> Address:-</h4><br>
      <h4> City:-</h4><br><hr><br>
        <h4>Your Blood Camp Details Will Be Updated And Everyone Will Get Notified Within 24 Hours Of Time.</h4><br><hr><br>
      <h4> Your Organization Is Creating a Deep Impact On Society :) </h4>


    </fieldset>


  </form>

</section>

</div>

<script>

var parent, next_fs, previous_fs;



$(".next").click(function(){
  parent = $(this).parent();
  next_fs = $(this).parent().next();
  prev_fs = $(this).parent().prev();
  $(parent).hide();
  $(next_fs).show();
  $("#progressbar li").eq($("fieldset").index(parent)).addClass("active");
   // $("#progressbar li").eq($("fieldset").index(parent)).removeClass("active");

 });

 $(".previous").click(function(){
   parent = $(this).parent();
   prev_fs = $(this).parent().prev();
   $(parent).hide();
   $(prev_fs).show();
   // $("#progressbar li").eq($("fieldset").index(prev_fs)).addClass("active");
   $("#progressbar li").eq($("fieldset").index(prev_fs)).removeClass("active");

 });
 </script>
</body>

include('../dbcon.php');

if(isset($_POST['submit'])){

echo('divesh');

I expect that atleast when submit is clicked, the php segment recognizes it




Error on adding service refrerence to DNN site

have successfully created a working model interacting with an external web service via a service reference in my Visual Studio dev environment.

I now want to set this up on our Evoq Content Basic site as a DNN module. So Step 1 was to add the service reference to dnn, but as soon as the reference was created in the app_webreference folder it brings down our site with the following error below.

Reference.svcmap: Could not load file or assembly 'antlr.runtime, >Version=2.7.6.2, Culture=neutral, PublicKeyToken=1790ba318ebc5d56' or one of >its dependencies. The system cannot find the file specified. Assembly Load Trace: The following information can be helpful to determine >why the assembly 'antlr.runtime, Version=2.7.6.2, Culture=neutral, >PublicKeyToken=1790ba318ebc5d56' could not be loaded. WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value >[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value >[HKLM\Software\Microsoft\Fusion!EnableLog].

I have never added a web service in DNN before so I am hoping the error will mean something to one of you guys. after all, it should not be that hard? and adding a service reference is the method most DNN tutorials recommend




how to make disabled input button not ‘grey’ in ios browser?

html
(input type button disabled), on IPhone devices it's grey!
but I want it stay in the same style when it's disabled...
how to do that?

I tried use “-webkit-appearance: none;”
all (input type button) changed to my css,
but the disabled buttons is still grey...
even if I write "input:disabled{background-color:white}"

<style>
input{
    display: block;
    -webkit-appearance: none;
    margin:5px;
    border: 2px solid #000;
    background-color: white;
}

input:disabled{
    display: block;
    border: 2px solid #000;
    webkit-appearance: none;
    background-color: white;
    }
</style>
<body>
<input id="button1" type="button" disabled>

</body>

I want IPhone use the style I write... on IPhone,https://imgur.com/a/OkTjzoa on PC/Android,https://imgur.com/1miAJtZ




how to creating a web service out of this code

I was sent a soap (WSDL) code by the institute I work in and asked me for the URL (I guess its for the web server I'm supposed to create ) but I don't know what I'm supposed to do with the code or how to create a web service based on it. PS its for subscribing and unsubscribing from an SMS service the following code is a subscription example theirs one just like for unsubscribing

iv'e tried watching videos on creating web services but none of them tells me what to do with the code I have


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
   <soapenv:Body> 
      <ns1:syncOrderRelation xmlns:ns1="http://www.csapi.org/schema/parlayx/data/sync/v1_0/local"> 
         <ns1:userID> 
            <ID>8619800000001</ID> 
            <type>0</type> 
         </ns1:userID> 
         <ns1:spID>001100</ns1:spID> 
         <ns1:productID>1000000423</ns1:productID> 
         <ns1:serviceID>0011002000001100</ns1:serviceID> 
         <ns1:serviceList>0011002000001100</ns1:serviceList> 
         <ns1:updateType>1</ns1:updateType> 
         <ns1:updateTime>20130723082551</ns1:updateTime> 
         <ns1:updateDesc>Addition</ns1:updateDesc> 
         <ns1:effectiveTime>20130723082551</ns1:effectiveTime> 
         <ns1:expiryTime>20361231160000</ns1:expiryTime> 
         <ns1:extensionInfo> 
            <item> 
               <key>accessCode</key> 
               <value>20086</value> 
            </item> 
            <item> 
               <key>chargeMode</key> 
               <value>0</value> 
            </item> 
            <item> 
               <key>MDSPSUBEXPMODE</key> 
               <value>1</value> 
            </item> 
            <item> 
               <key>objectType</key> 
               <value>1</value> 
            </item> 
            <item> 
               <key>isFreePeriod</key> 
               <value>false</value> 
            </item> 
            <item> 
               <key>payType</key> 
               <value>0</value> 
            </item> 
            <item> 
               <key>transactionID</key> 
               <value>504016000001307231624304170004</value> 
            </item> 
            <item> 
               <key>orderKey</key> 
               <value>999000000000000194</value> 
            </item> 
            <item> 
               <key>keyword</key> 
               <value>sub</value> 
            </item> 
            <item> 
               <key>cycleEndTime</key> 
               <value>20130822160000</value> 
            </item> 
            <item> 
               <key>durationOfGracePeriod</key> 
               <value>-1</value> 
            </item> 
            <item> 
               <key>serviceAvailability</key> 
               <value>0</value> 
            </item> 
            <item> 
               <key>channelID</key> 
               <value>1</value> 
            </item> 
            <item> 
               <key>TraceUniqueID</key> 
               <value>504016000001307231624304170005</value> 
            </item> 
            <item> 
               <key>operCode</key> 
               <value>zh</value> 
            </item> 
            <item> 
               <key>rentSuccess</key> 
               <value>true</value> 
            </item> 
            <item> 
               <key>try</key> 
               <value>false</value> 
            </item>             
            <item> 
               <key>shortMessage</key> 
               <value>Hello world.</value> 
            </item> 
         </ns1:extensionInfo> 
      </ns1:syncOrderRelation> 
   </soapenv:Body> 
</soapenv:Envelope> `````




TinyMce image upload plugin problem: image can not upload

I use tinymce-5 and I write my first plugin. I have a problem witch image upload. How I can image upload in this code?

For me, the solution is to force dropzone to accept the file, but the ideal solution is to wrap up the full set of images available in tinymi.

Additionally. If anyone knows how to throw a picture and text immediately into the tiny editor, I will be grateful.

Additionally. I have a question, how can I generate a preview of the text and image below?

(function () {
    var floatright = (function () {
        'use strict';

        tinymce.PluginManager.add('floatright', function (editor, url) {

            /*
            Add a custom icon to TinyMCE
             */
            editor.ui.registry.addIcon('icon-image-float-right', '' +
                '<?xml version="1.0" standalone="no"?>\n' +
                '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"\n' +
                ' "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\n' +
                '<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n' +
                ' width="16pt" height="16pt" viewBox="0 0 512.000000 512.000000"\n' +
                ' preserveAspectRatio="xMidYMid meet">\n' +
                '<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n' +
                'fill="#000000" stroke="none">\n' +
                '<path d="M710 4471 c-79 -24 -145 -87 -176 -167 -18 -47 -19 -106 -19 -1759\n' +
                'l0 -1710 23 -47 c30 -61 93 -114 156 -133 75 -23 3657 -23 3732 0 63 19 126\n' +
                '72 156 133 l23 47 0 1710 c0 1653 -1 1712 -19 1759 -23 60 -76 120 -130 149\n' +
                'l-41 22 -1840 2 c-1012 1 -1851 -2 -1865 -6z m3650 -2150 c0 -770 -3 -1406 -6\n' +
                '-1415 -6 -15 -173 -16 -1795 -16 l-1789 0 0 1408 c0 775 3 1412 7 1415 3 4\n' +
                '811 7 1795 7 l1788 0 0 -1399z"/>\n' +
                '<path d="M1095 3411 c-49 -21 -60 -47 -60 -147 0 -89 1 -95 28 -121 l27 -28\n' +
                '835 0 835 0 27 28 c27 26 28 32 28 122 0 90 -1 96 -28 122 l-27 28 -823 2\n' +
                'c-452 1 -831 -2 -842 -6z"/>\n' +
                '<path d="M1095 2761 c-49 -21 -60 -47 -60 -147 0 -89 1 -95 28 -121 l27 -28\n' +
                '835 0 835 0 27 28 c27 26 28 32 28 122 0 90 -1 96 -28 122 l-27 28 -823 2\n' +
                'c-452 1 -831 -2 -842 -6z"/>\n' +
                '<path d="M1095 2111 c-50 -21 -60 -47 -60 -152 0 -94 1 -100 28 -126 l27 -28\n' +
                '1480 0 1480 0 27 28 c27 26 28 32 28 127 0 95 -1 101 -28 127 l-27 28 -1468 2\n' +
                'c-807 1 -1476 -2 -1487 -6z"/>\n' +
                '<path d="M1085 1421 c-50 -21 -60 -47 -60 -152 0 -94 1 -100 28 -126 l27 -28\n' +
                '1480 0 1480 0 27 28 c27 26 28 32 28 127 0 95 -1 101 -28 127 l-27 28 -1468 2\n' +
                'c-807 1 -1476 -2 -1487 -6z"/>\n' +
                '</g>\n' +
                '</svg>');
            /*
            Use to store the instance of the Dialog
             */
            var _dialog = true;

            /*
            An array of options to appear in the "Type" select box.
             */
            var _typeOptions = [];

            /**
             * Get the Dialog Configuration Object
             *
             * @returns }
             * @private
             */
            function _getDialogConfig()
            {
                return {
                    title: 'Float right text dialog',
                    body: {
                        type: 'panel',
                        items: [{
                            type: 'textarea',
                            name: 'content',
                            label: 'Enter your text here',
                            //items: _typeOptions,
                            flex: true
                        }, {
                            type: 'dropzone',
                            name: 'image',
                            plugin: 'image',
                            menubar: "insert",
                            toolbar: "image",
                            label: 'Enter image',
                            flex: true,
                            id: 'float_right_image',
                            images_upload_url: "/hydra/wysylka-wiadomosci/zaladuj-plik/974",
                            images_upload_base_path: "https://hydra/img/media/news/975/",
                            onChange: function(){
                                var URL = document.dropzone.value;
                                var win = tinyMCEPopup.getWindowArg("window");

                                // insert information now
                                win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;

                                // are we an image browser
                                if (typeof(win.ImageDialog) != "undefined") {
                                    // we are, so update image dimensions...
                                    if (win.ImageDialog.getImageData)
                                        win.ImageDialog.getImageData();

                                    // ... and preview if necessary
                                    if (win.ImageDialog.showPreviewImage)
                                        win.ImageDialog.showPreviewImage(URL);
                                }

                                // close popup window
                                tinyMCEPopup.close();
                            }
                        }]
                    },
                    onSubmit: function (api) {
                        // insert markup
                        editor.insertContent('<p>You selected Option ' + api.getData().type + '.</p>');

                        // close the dialog
                        api.close();
                    },
                    buttons: [
                        {
                            text: 'Close',
                            type: 'cancel',
                            onclick: 'close'
                        },
                        {
                            text: 'Insert',
                            type: 'submit',
                            primary: true,
                            enabled: false
                        }
                    ],
                    width: 800,
                    height: 800
                };
            }

            /**
             * Plugin behaviour for when the Toolbar or Menu item is selected
             *
             * @private
             */

            function _onAction()
            {
                // Open a Dialog, and update the dialog instance var
                _dialog = editor.windowManager.open(_getDialogConfig());

                // block the Dialog, and commence the data update
                // Message is used for accessibility
                _dialog.block('Loading...');

                // Do a server call to get the items for the select box
                // We'll pretend using a setTimeout call
                setTimeout(function () {

                    // We're assuming this is what runs after the server call is performed
                    // We'd probably need to loop through a response from the server, and update
                    // the _typeOptions array with new values. We're just going to hard code
                    // those for now.
                    _typeOptions = [
                        {text: 'First Option', value: '1'},
                        {text: 'Second Option', value: '2'},
                        {text: 'Third Option', value: '3'}
                    ];

                    // re-build the dialog
                    _dialog.redial(_getDialogConfig());

                    // unblock the dialog
                    _dialog.unblock();

                }, 1000);
            }

            // Define the Toolbar button
            editor.ui.registry.addButton('floatright', {
                text: "Hello Button",
                icon: 'icon-image-float-right',
                onAction: _onAction
            });

            // Define the Menu Item
            editor.ui.registry.addMenuItem('floatright', {
                text: 'Hello Menu Item',
                context: 'insert',
                icon: 'icon-image-float-right',
                onAction: _onAction
            });

            // Return details to be displayed in TinyMCE's "Help" plugin, if you use it
            // This is optional.
            return {
                getMetadata: function () {
                    return {
                        name: "Hello World example"
                    };
                }
            };
        });
    }());
})();




DNS Settings not updating even with reduced TTL

I'm setting up a new domain www.verifiedsupply.com using Google Cloud DNS. See below: enter image description here

However, I don't think the DNS settings are updated properly. I have reduced the TTL for the settings to take effect immediately but it doesn't get updated and I am still forwarded to the wrong address.

Is there a minimum time required for changes to take effect? What can I do to make the update work immediately?




Upload file using Web Service (ASMX) WinForm c#

I use this tutorial upload file using web service to upload file using web service and it works fine.

My problem is that there is probably a file size limitation. When I tried uploading a 0.5MB file it worked fine. I tried to upload a larger file like 5MB and it did not upload.

Is there any limitation? If so, what is the limitation and how is it changed?




payment gateways problems in iOS webView

I have a desktop application. in that i integrated Razor payment gateway,Its worked fine in browser, but i created an iOS using web view for that web Application. In iOS application payment page not responding.




What version of Microsoft.AspNetCore.Cors is compatible with .net core 2.1 API?

I'm installing the Microsoft.AspNetCore.Cors package for my core2.1 api and when the package is installed, restoring fails because of version conflict. This is the .net CLI enter image description here




Need recommandation about learning web url include

I have found some page url can include like php:\ , data:\ , javascript :\ function. What do they do? What are the purposes of them? How can I learn all of these?




What's the difference between a Multiple pages PWA with a SPA pwa?

recently I created a SPA with angular and I config it to be PWA ( a Single page Application that is PWA) and recently I found that we can also change a regular web page (MPA) to PWA as well

So my question is

what's the difference between a Multi pages web (config to be a pwa) with SPA (config to be a PWA)?

all of us know that most important benefit of SPA is a without refresh webpage so when I create a regular web app and config or convert it to a PWA and when it save on Mobile or local storage then the End user can't see or fill the refresh on the Page because its fast load so

why we have spend more time to develop a SPA and change it to PWA when we can easily create a regular webpage and change it PWA? thanks in advance




Strange Java web application in Eclipse

I am new to Java web programming and currently working with a Java web project. Although I have searched for days but still not able to figure out what kind of project is it and how to configure to get it run. It has a webapps directory and a web application inside. But the Java code is stored outside and under the root directory.

So what documents should I read to get familiar with this kind of project, and how could I configure to get it run on Tomcat?

eclipse image




How to automatisate getting information from website?

So, there is a website https://playhearthstone.com/en-gb/community/leaderboards I want to get information from the table using python.

I tried to use requests library but there is an error instead of table in response.




Is there any way to hide javascript from a web page [duplicate]

This question already has an answer here:

Is there any way to just hide the javascript code in our webpage I dont want that the client can able to see my javascript function is there any way.

Please Dont suggest me the minification,obfucation and disabling the right click I want that function to be hide the client can not able to see it.




how to create a drag bar to resize image on a div

I need to implement a image resize drag bar. This bar will dynamically resize the image when dragged horizontally.
The largest setting will increase the size of the photo to 200%.




retrieving exchange rate from banks' web site

The bank site displays the exchange rate in a table. How can I retrieve the exchange rate of a particular currency to a variable so that I can display it on a text box in a form. Please guide me




mercredi 27 mars 2019

Deploy website to github and editing online and showing blank

After I'd pushed site made by jekyll to Github repo via git. my site was published it was ok.After I did some changes inside Github online for one of my files Halim.md Update Halim.md my link got blank. after some actions now the site showing this message error again:


404 There isn't a GitHub Pages site here.

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

GitHub Status — @githubstatus


How to fix it?




PIXI.js Event Handlers Not Working, Sprite Bounds Way Too Small

I am creating an interactive app with pixi.js.

In this app, I have some sprites that I want to drag and drop.

I have created these Sprites by extending the Sprite class and adding some additional logic to the constructor as follows:

export class Tangible extends Sprite {
/**
 * Base Class for all tangibles
 */
constructor(texture, id) {
    super(texture);
    this.id = id;

    this.scale.set(0.1);

    // enable the tangible to be interactive... this will allow it to respond to mouse and touch events
    this.interactive = true;

    // this button mode will mean the hand cursor appears when you roll over the tangible with your mouse
    this.buttonMode = true;

    // center the tangible's anchor point
    this.anchor.set(0.5, 0.5);

    // setup events for mouse + touch using
    // the pointer events
    this
        .on('pointerdown', onDragStart)
        .on('pointerup', onDragEnd)
        .on('pointerupoutside', onDragEnd)
        .on('pointerover', onPointerOver)
        .on('pointerout', onPointerOut)
        .on('pointermove', onDragMove);

}

getId() {
    return this.id;
}

drawBounds() {
    console.log("DRAWING BOUNDS EXCEPT NOT REALLY");
    let bounds = this._bounds.getRectangle();
    let boundsArea = new Graphics();
    boundsArea.beginFill(0xffffff);
    boundsArea.lineStyle(4, 0xffffff, 1);
    boundsArea.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
    boundsArea.endFill();
    this.parent.addChild(boundsArea);
}

}

onDragStart, onDragEnd, and onDragMove are methods defined outside the class and match the code given here:

https://pixijs.io/examples/#/demos/dragging.js

onPointerOver and onPointerOut are debugging methods i've added that just contain console.logs to let me know if they're working (they're not).

Each of these sprites is stored inside the following container class during the main set up:

export class Drawer extends Container { 
/**
 * Constructs a new Drawer object, for holding tangibles.
 * @param init_x The initial x position of the drawer area on the canvas
 * @param init_y The initial y position of the drawer area on the canvas
 * @param init_w The initial width of the drawer area.
 * @param init_h The initial height of the drawer area.
 *
 * @param open_x The x position of the drawer when it's open.
 * @param closed_x The x position of the drawer when it's closed.
 */
constructor(init_x, init_y, init_w, init_h, open_x, closed_x, capacity) {
    super();
    this.x = init_x, this.y = init_y, this.w = init_w, this.h = init_h;
    this.drawerArea = this.createDrawerArea(0, 0, init_w, init_h);
    this.addChild(this.drawerArea);

    this.interactive = true;

    this.open_x = open_x;
    this.closed_x = closed_x;

    this.num_tangibles = capacity;
    this.tangibles = {};

    this.closeDrawer();
}

addTangible(tangible) {
    let tId = tangible.getId();
    let hPad = 100;
    if(!(tId in this.tangibles) || (this.tangibles[tId] == null)) {
        this.tangibles[tId] = tangible;
        tangible.x = hPad + tangible.width + (this.width - (2 * hPad)) * (tId / (this.num_tangibles - 1)); // const is left padding
        console.log('tw: ' + tangible.width + ' ts: ' + tangible.scale);
        tangible.y = this.height * 0.5;
        console.log('tangible.x: ' + tangible.x + 'tangible.y: ' + tangible.y);
        this.addChild(tangible);
    } else {
        // some logic that places it somewhere else
    }
}

removeTangible(tangible) {
    let tId = tangible.getId();
    if((tId in this.tangibles) && (this.tangibles[tId] != null)) {
        this.tangibles[tangible.getId()] = null;
        // remove piece from drawer and close drawer
    } else {
        // throw an error? This should basically never happen
    }
}

openDrawer() {
    console.log("open_x: " + this.open_x);
    // this.drawerArea.x = this.open_x;
    this.x = this.open_x;
    for(var key in this.tangibles){
        this.tangibles[key].drawBounds();
    }
}

closeDrawer() {
    // this.drawerArea.x = this.closed_x;
    this.x = this.closed_x;
}

createDrawerArea(x, y, w, h) {
    // Create area outline
    let drawerArea = new Graphics();
    drawerArea.beginFill(0x68a2ff);
    drawerArea.lineStyle(4, 0xcccccc, 1);
    drawerArea.drawRect(x, y, w, h);
    drawerArea.endFill();
    return drawerArea;
}
}

Each of the event handler / functions have console.log statements to let me know when they are actually being hit.

onDragMove is being called any time the cursor moves, regardless of whether the cursor is over one of these sprites, or even whether it's over the pixi canvas.

I can see that when I mouse down and then mouse up (click, or click drag) over one of the sprites, onDragEnd is being called.

onDragStart is never called though.

In an attempt to debug, I've added a method to draw the _bounds of each sprite, and am seeing that for some reason, the bounds are extremely tiny relative to the sprites. This seems really weird to me, and I don't know why that would be the case.

Some other information that might be helpful - The containers that hold the sprites move off and onto the canvas activated by button presses. When this happens, I move the entire container and the sprites move with it, as expected.

    $("#some-drawer").on('click', function() {
    if($(this).hasClass('active')) {
        $(this).removeClass('active');
        gmCanvas.someDrawer.closeDrawer();
    } else {
        $(this).addClass('active');
        gmCanvas.someDrawer.openDrawer();
    }
});

Any help is appreciated, really stuck on this one. Thanks!




I Can'T make the Elements to stay together after resizing!! Html

I really can't make the elements stay together... They float everywhere and disappear when resizing window. Please help me!!! It's been 5 days. Thank you so much!!!

That's the site https://ift.tt/2TH9Re9




learning C before JavaScript

Do i need to learn c before learning JavaScript??? I want to become a front end developer and i have pretty good knowledge of HTML and CSS. Today my instructor started to teach me JavaScript assuming that I've base knowledge of C but which i don't have and there's the problem started. He wrote a code where we can search a digit from a number. He used while loop there and i don't have any idea of Loop at all. So when i have asked him what is while loop he said you will face this kind problem throughout the course if you don't know C. So he told me to learn C and JavaScript simultaneously which is really pain in the butt. He further added that all programming languages evolved from C so if you don't know C you can't be a better programmer. My point was that if i need to search a digit from a number the logic is not going to change for any language so if i learn the the syntax for the JavaScript i can write that code. Concept of loop is in C and also in JavaScript so why i need to learn C to get the concept of loop. Well i don't have any problem with learning C but i don't want to put my time in learning a language which i don't know where I'm gonna use in my web development career. I'm feeling really discouraged. Should I start learning C???




R: web scrapping with inputs and results on a new pop-up

Hi I am doing a lot of DNA sequence conversions through this webpage (http://www.bioinformatics.org/sms2/rev_comp.html).

I will need to input some sequence to the input textbox and then click the Submit button.

Once I click the Submit button, a pop up window will come out and have some text(transformed sequence) that I then want to save (see below as an example).

As I need to do thousand of them, could someone suggest how i could do it in R and save the output in a dataframe? Thanks!

INPUT to the textbox:

>Sample sequence 1
garkbdctymvhu

OUTPUT in the pop up:

Reverse Complement results

>Sample sequence 1 reverse complement
adbkraghvmytc




function to get image from database is not working

I'm new to Javascript. I want to add an icon to all my project's web pages. This icon changes accordingly to whoever logs in in my page. What i'm trying now is, in master page load (when i have all of its data in codebehind, including his chosen icon), i introduced a js function to change icon:

    (function icon(image) {
        var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
        link.type = 'image/x-icon';
        link.rel = 'shortcut icon';
        link.hre = image;
        document.getElementsByTagName('head')[0].appendChild(link);
    })();

(adapted from here: Changing website favicon dynamically)

im trying to call this function with Page.ClientScript.RegisterStartupScript() method:

  (protected void Page_Load(object sender, EventArgs e)
  {
  if (!Page.IsPostBack)
     {
        //...

        UserModel usuario = (UserModel)Session["usuario"];

        //...

        Page.ClientScript.RegisterStartupScript(this.GetType(), "icone", $"icone({(Bitmap)new ImageConverter().ConvertFrom(usuario.imagem)});", true);
     }
  }

The method is simply not executing(its not returning error either, it just "jump it"), and i sincerely have no idea why.

OOOOR, there may be a better way to do it, but i just cant figure it.

(I will later add validation for when user has no image in database. Assume for now it will never be null).




Determine the cause of these warnings

Log entries

    2019-03-27 18:42:09.812  WARN 400 --- [io-8080-exec-10] o.s.web.servlet.PageNotFound             : No mapping for POST /inform
    2019-03-27 18:42:24.923  WARN 400 --- [nio-8080-exec-1] o.s.web.servlet.PageNotFound             : No mapping for POST /inform
    2019-03-27 18:42:39.961  WARN 400 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound             : No mapping for POST /inform
    2019-03-27 18:42:54.998  WARN 400 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound             : No mapping for POST /inform

I cannot find the source of this issue, I have googled for /inform endpoints and the full line even can't find anything related to this

Because its a warning it is not effecting the outcome that I can see but I would like to controll this by the time I go into production

My suspicion was that its generated by spring-boot but there is no documentation about it's existance.

Does anyone know what causes this? It might just work for me if I can controll it!

My dependencies is:

    <dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jsondoc</groupId>
        <artifactId>spring-boot-starter-jsondoc</artifactId>
        <version>1.2.20</version>
    </dependency>
    <dependency>
        <groupId>org.jsondoc</groupId>
        <artifactId>jsondoc-ui-webjar</artifactId>
        <version>1.2.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-kotlin</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-reflect</artifactId>
    </dependency>
    <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-stdlib-jdk8</artifactId>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    </dependencies>




authenticate web api (calls) using microsoft identity "Bearer Authentication"

i'm building a new project using mvc and web api, i'll depend on microsoft identity for authentication so i need to authenticate all the web api call with bearer authentication, i didn't find any good reference to start from.

do you recommend a good tutorial line by line or a good article to follow?

Blockquote




How to set properties of background image in reactJS

I was able to get the background of my header container to show an image. However, i dont k ow how to set the size of the BACKGROUND IMAGE. SO what appears in the heading container just shows a image that is too big to appear in the header container.

I tried to search online Change the sizes of the containers using vh and vw Using Inline styles

//App.js
import React from "react";
import NavBar from "./NavBar";

const ContactUs = () => {
    return(
        <div className="contactUsContainer">
        <NavBar/>
        <div className="contactUsHeader">
           <h2>Contact Us</h2>
        </div>
        <div>
            <span></span>
        </div>
        </div>
    );
}

export default ContactUs;


//app.css

.contactUsContainer {
  height: 100%;
  width: 100%
}

.contactUsHeader {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: url("http://www.stapl.co.in/sites/default/files/imagecache/full-zoom/files/projects/6/83/6-83-wartsilla-3.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  height:30vh;
  width: 100vw;
  background-color: blue

}

Expected Result: background image to show full image, just in smaller size

Actual Result: background image shows very big, which omits much of the image content

enter image description here




idea to write a tool scan sql injection

I have some idea to write a tool scan sql injection but i think it is not enough.Can you help me some ideas ?

I thought about how to write this tool . I known about sqlmap and another tool but now i tried to write my tool to do this job. my idea :

Step1 get html of target url and analysis to find some form.

Step2 if no form -> no sql injection. else send request to server with some data(some special charater like ;,./... and some sql syntax ).

Step3 if webserver response some data or some information(it means webserver did not check data was sent from user has some special or sql syntax ) so it can be a sql injection.




How to change django website language from English to Urdu ? Please tell me easy method as I am new in django

I made a website in django and but it should have both English and Urdu language options. Please tell me any simple method for converting this into Urdu language with code if possible. Thanks in advance




Imgages not showing on mobileview

Im very new to laravel spark, and just picked up this bug. I have the problem that logos for companies on my website aren't showing on mobile. It looks fine on normal view, but if i use Chrome developer tools, and scale it to >~380 width the logos disappear and the first letters of the company name show up instead. I cant for the life of me figure out where in all the code it decides to do this. Tried searched for 380 but came up short. So, does any1 know where i should look, and what i should look for? .vue or .blade files or some third place?




how do i print a variable inside a servlet

i am having this problem where i have retrieved a value using the post method and i want to print that value how do i do that?

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {

    String comment = request.getParameter("comment");
    PrintWriter out = response.getWriter();
    int id = Integer.parseInt(request.getParameter("qid"));

    out.print(+id+);
}

/**
 * Returns a short description of the servlet.
 *




Not showing string showing this weird error? function(){return Fn("DataSnapshot.val",0,0,arguments.length),this.node_.val()}

When I try to pull the data this is what happens, I am using child_added to be real-time. I feel like I have to convert it to a string/but I do not know how Sorry for my english here is the js file


    $(document).ready(function(){
    var config = {
            apiKey: "AIzaSyB9p1VvVfhnbrcDwUKUuSqw9aQsqnDi4nQ",
            authDomain: "html5project-870df.firebaseapp.com",
            databaseURL: "https://html5project-870df.firebaseio.com",
            projectId: "html5project-870df",
            storageBucket: "html5project-870df.appspot.com",
            messagingSenderId: "54935462861"
          };
    //firebase.initializeApp(config);
    if (!firebase.apps.length) {
        firebase.initializeApp({});
    }
    var database = firebase.database();
    var Rootref = database.ref().child("users");

    Rootref.on("child_added", snap => { 
    var test = "test5765";  

    var name = snap.child("user").val;
    console.log(name);
    $("#read").append("<tr><td>"+name+"</td></tr>");
    ```

Here is the result

function(){return Fn("DataSnapshot.val",0,0,arguments.length),this.node_.val()}
function(){return Fn("DataSnapshot.val",0,0,arguments.length),this.node_.val()}
function(){return Fn("DataSnapshot.val",0,0,arguments.length),this.node_.val()}
It posts three times because there are three events
Any help is appreciated
Here is the github link
https://github.com/SaiVeer04/transcriber/blob/master/read.js




responsive system don't work Bootstrap 4 version

i want to create a responsive navigation bar with bootstrap 4 but unfortunately i got some error when i set up the screen under the 1024 * 1366 resolution the responsive system don't work well.

over 1024*1366 resolution : enter image description here

under 1024*1366 resolution :

enter image description here

my code :

  <header>
    <nav class="navbar navbar-expand bg-success navbar-dark">
      <a class="navbar-brand" href="#">
        <img src="img/images.png" alt="Logo" style="width:50px;">
      </a>
      <ul class="navbar-nav">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle text-light" href="#" id="navbardrop" data-toggle="dropdown">
            Menu
          </a>
          <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Trap</a>
            <a class="dropdown-item" href="#">RnB</a>
            <a class="dropdown-item" href="#">Old-School</a>
          </div>
        </li>
        <li class="nav-item">
          <a class="nav-link text-light" href="#">Home</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-light" href="#">About me</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-light" href="#">Contact</a>
        </li>
        <form class="form-inline" action="/action_page.php">
    <input class="form-control mr-sm-2" type="text" placeholder="Search">
    <button class="btn btn-light" type="submit">Search</button>
  </form>
        </ul>
        <ul class="navbar-nav ml-auto">
        <li class="nav-item">
            <img src="img/finger.png" class="nav-link" style="width:40px">
          </li>
          <li class="nav-item">
            <a href="" class="nav-link text-light">sign up</a>
          </li>
          <li class="nav-item">
            <img src="img/profil.png" class="nav-link" style="width:40px">
          </li>
          <li class="nav-item">
            <a href="" class="nav-link text-light">login</a>
          </li>
          <li class="nav-item ">
            <img src="img/basket.png" class="nav-link" style="width:40px;">
          </li>
          <li class="nav-item">
            <a class="nav-link text-light" href="#">Panier</a>
          </li>
        </ul>
    </nav>
  </header>

thanks