jeudi 30 novembre 2017

why are there so many duplicate words in url

Like this one, why are there so many duplicate words in url? http://ift.tt/2zSHfcP

Even when I add more biochemistry, it still works! Anyone can explain?




How to get title of the websites by web scrapping

I want to write a script in PHP/PYTHON that performs a web search on a given input and returns the titles of the websites that are shown on the first page in google results. Also, I would need some guidance about how can you perform a web scrapping on youtube to get the first URL for a given input.




Why google can't find my personal blog?

Well, I've developed a website xudongshao's website based on hexo

And according to some tutorials I've set the sitemap and so on. But it seems that only if I search the content of my blog, that I can find my post. If I search the title, in this case, is the "Malware analysis: GINA interception", it shows no results. I really don't know why. enter image description here

enter image description here

enter image description here

This is how configure everything. Can anyone help me? Thanks a lot!




Is appToken and appId the same thing?

I didn't use smooch for a while and one of the chatbots that I have stopped working in Web Messenger. I see that Whisper no longer exists, does anybody know when was that changed?

Also is appToken and appId the same thing? I am pretty sure that last time we configured appToken, and now I see just the appId.




What frameworks or libraries are used in FIFA website?

I would like to know what kind of CSS or Javascript Libraries/frameworks are used in FIFA web site This is the URL: http://ift.tt/2AihT75




HTML/Javascript page transition

I've been browsing Awwwards and i saw websites that has a custom page transition specifically this one https://phoenix.cool/ and I've been wondering how do they do that smooth transition to other page. If you have any source on page transitions that would be highly appreciated. thank you.




Automate Website clicking

I would like to automate some repetitive online tasks. For example I would like to go through every page on a website and check if a certain text is found on that page. I do know how to automate steps that I have already done. However I need to do this for thousands of pages. Does anyone have any pointers to get me started? What tools/language would I need to use. Thank you, Joshua




How to create a site for file transfer?

I need to create a web page that allows the users to send me quite heavy files (up to 2 gb), there is no transfer between users only from them to me, and it doesn't need any kind of session login, it doesn't require a very high level of security, where should I start? is too complex to do? I've only worked on wordpress style templates.




PHP: Parsing JSON with foreach()

I tried decoding a JSON file and display its contents. My PHP code for this is:

<?php        
  $proj = json_decode(file_get_contents('projects.json'));
  foreach ($proj->projects as $p) {
    $name = $p->name;
    $auth = $p->author;
    $file = $p->filep;
    project($name, $auth, $file);
  }
?>

and my JSON file is:

{
    "projs": [
        {
            "name": "RGBFade",
            "author": "me",
            "filep": "rgbfade.txt"
        },
    ]
}

The project() function and the implementation of the JSON File works.

However, it throws this error:

Warning: Invalid argument supplied for foreach() in index.php on line 38

Does anyone know how to fix this?

If you would like to see the site, it's here




Cancel database queries after closing browser

I am having web application (using angular.js and devextreme) which calls some API to get data from database(Mysql). I have some long running queries for larger data set. If I close the browser or navigate to other pages, current queries getting running on database. If user navigates to different pages frequently , database having many unnecessary queries running. Is there any way so that I can track DB queries (like some query Id etc) from web app, so whenever user moves to another web pages, I can cancel current running query?

Note: I don't want to use query timeout on DB as I have some background long running queries on DB server.




Is it normal for a website to go down during a nameserver switch?

So I decided to change my nameserver locations to another webhost and now my website is down. It's reading a "403 Error - Forbidden" message. Is this as a result of propagation or did i make a mistake on my part?




LDAP authentication strategy for enterprise web application?

We are building enterprise web application and it will be hosted on a centralized cloud server. More than one organization will be using this application, and for authenticating the users we will be using LDAP authentication. Each organization maintains their own active directory system.

Now, If I want to authenticate the user when he entered his credentials how do I recognize which organization he belongs to so that I can connect to right LDAP server to validate his credentials.

NOTE: There are multiple Active Directories. The number goes up as we get more clients.

Any help?




several key value for post http request vs one key and json value

I would like to know which way is standard and normal. I send a post http request with a lot of key and value pairs but I can send only one key and a json string object as a value. Which is more suitable Thx




I am looking for an installer for web applications [multi platform] [PHP]

I created a web application with the following languages: AngularJS / PHP / Html / Css. I would like to deploy my application to customers. Some have Windows servers, Linux ... I am looking for a unique solution to make a simple installation

Thank's




What approach should be used? If client demands to test a web app on IE 9, 8 and 7?

If clients demands to test web app on previous versions for IE. The development has been all on IE 10, Firefox and Google Chrome.




web service that I can use to test posting an xml document

I'm considering starting a project that will require me to post an XML document to a web service developed/maintained by someone else. Before I start this project I want to get an idea of how difficult this will be by doing a test run using an existing web service (developed and maintained by someone else).

I'm looking for recommendations of an existing web service to which I could post an xml document and, if my code is right, get a response that verifies that I'm on the right track.

If there are no other good suggestions then my backup plan is to see if I can add a few local cafes using the Google Places API Web Service.

Thanks in advance




Navigate a web page from node - No browser

Every day at work i need to pass a card at enter and at leave.
This action is log into a local web site.
Since im working as "Outsourcing" then at the end of the month i need to log in with user and password to the local site and copy paste every "In" and "Out" row to the "Outsourcing" company web site.

This is very annoying thing to do but it must be done or i didn't get paid...

So i want to smooth thing a little and this is what i did so far:

A: Log in to the local web site (Type user and password and press log in)

B: Run some script in Console. The script take the data from the grid (In and Out time and Date) And send the Array of data to a Node server.

C: On the server i create a new script to use in the outsourcing website company And send it to my email.

D: Then i open the outsourcing web page company, navigate to the relevant section.

E: Open console and paste the script that sent to my email and that's it. No dirty job.

But id' like to do it even more automatically, I'd like to have

A node service that run every few hours and get the data from the local web site and check it against some localDB, probably a sqlite.
If there is a new row then:

A: send the data to my email

B: At the end of the day, after "Leave" update the Outsourcing company web site with the new row - which is "In" and "Out" time.

I understand that there is a security issue, for example can i read a data from a web page, navigate and press button without opening browser?

I'd like to update the process to be more automatically and i'd like to hear your tips and suggestion.

Important note: I'm not trying to hack into something, i do have user and password for those site and i'm planning to use them in the process.

Thank you




textindex change firing multiple time with 2 gridview in asp.net c#

I have two gridview in one update panel one gridview1 working with selected index change and another gridview2 for entry details based gridview1 selection. gridview2 having dropdown and textbox it works both on mouse pointer and tab saving to db through textindexchanged event if end user press tab it works fine else if after typing in textbox they directly cilck to griview then textindex change firing twice in asp.net c# web application




mercredi 29 novembre 2017

Proxy and Digest Authentication Issues

I have a problem with Proxy and Digest authentication. My web server provide proxy to another web server using Lighttpd mod_proxy.

Structure like this.

PC: eth 1 - 192.168.37.200

Server 1: eth 1 - 192.168.37.100, eth 2 - 192.168.50.100

Server 2: eth 1 - 192.168.50.101

[PC] <------------------> [Server 1] ------------------- [Server 2]

Client                    Proxy server                   Target server

Proxy url like this: http://ift.tt/2i1jGmz

Server 1 and server 2 need another digest authentication.

But web browser fails to distinguish authentication information between two servers. So, browser shows login popup again and again.

How can I solve? Please your help.




Html or App control sound effects from server

I am trying to solve a problem for an upcoming project. I have a server which will have a usb 8IO audio card connected. It will have a bunch of sounds fx to play over specific speakers (Audio interface is connected to a BSS DSP -> to amps-> to speakers).

I need an interface where i can play a sound on demand through a specific speakers (through a particular channel on the Audio interface.

Anyone know of a piece of software or some html that could accomplish this task? Currently i have a php website on the server which opens an xml file and allows the user to add files to it (the xml has sound name, url, pan, output - 1 of 4) then i can run a play command and define the track number to play. Only problem is i can't change volume on the fly in the xml document as the player only reads the file when opening. Also when the player closes, the file updates to the players configuration (wiping any edits done to the xml file).

My initial plan was to close the software down when the volume was adjusted then save the xml and reopen, but that would cut off any sounds currently going. The software i am running to is da_Sound.

Cheers Mitchell




Downloading source code from the Web

This question applies to multiple programming languages. I ask for Python and Ruby. The answer for other interpreted languages are also welcome by me.

I want to download and execute a script from the Web and its import (Python) or require (Ruby) to also download from the Web.

Example (Python, but the same applies to Ruby and other languages):

I want to execute script

http://ift.tt/2jwEiUe

If in script.py there is the operator

import mod

This "import" operator should download and compile

http://ift.tt/2i2ui4y

Certainly I want this to work recursively for modules importing other modules.

Yes, I am aware of security considerations. So I am going to use Linux security commands firejail and ulimit and execute it on a separate server to minimize the impact of possible hacking.




Ext JS SortType treecolumn

Using ExtJS 4.2.3. Have form with treecolumn xtype field which contains string value with number in begin. Column has 3 lvls of structure. On first lvl sort needs to be in order like (2, 3, 5, 40, 100 and etc).

enter image description here

After picking third lvl value in selection form, value in box will look like:

3.ABC.<BR>3.23.ABCCDD.<BR>3.23.5.  ABCC

Sample of code:

enter Picker = new Project.Picker({
                                    title: "Title1",
                                    proxyCfg: {
                                        url: Ext.state.Manager.get("url") + "TreeList",
                                        type: "ajax"},
                                    idProperty: "id",
                                    defaultRootId: "NULL",
                                    nodeParam: "parent_Code",
                                    PickerCfg: [
                                        { name: "id", type: "string", isSC: false },
                                        { xtype: "treecolumn", name: "name1", header: "Header1", type: "string", isSC: true, isHC: true },
                                        { name: "name2", type: "string" },
                                        { name: "name3", header: "Header3", type: "string", isSC: true}],
                                    viewConfig: {
                                        listeners: {
                                            itemdblclick: function (view, record) {
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("id", record.get("id"));
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("name1", record.get("name1"));
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("name3", record.get("name3"));
                                                trigger.setValue(record.get("name2"));
                                                this.up().up().destroy();
                                            }
                                        }
                                    },
                                    sorters: [{
                                        property: "name3",
                                        direction: "ASC"
                                    }]
                                }).show(this, function () { this.getComponent(0).DMS_search(); Picker.getComponent(0).getView().refresh(); });
                            }
                        },
                        tpl: "<table class='Gridd' style='border-collapse: collapse; border: medium none;'><tr><td><b>[Header1]: </b></td><td style='width:100%;'>{Name2}</td></tr><tr><td><b>[Header3]: </b></td><td>{Name3}</td></tr></table>"

Asking for help with sorting in selection form.




HTML5 standalone app with fullscreen custom resolution

I've been searching online and i can't really seem to find an answer.

Does somewhere out there exist basically a lite-weight web browser / app run-time, that allows you to set custom stuff like antialiasing (that should be available in NWJS via args, right?), render resolution etc...

I know about NWJS and Electron (that both use chromium), but AFAIK - there is no option for custom res full-screen run.

For the time being i care only for desktop, no mobile.

Please refrain from question: "Why?", "Why not choose different approach?"

It's more of a matter of "Can it be done with HTML|CSS|JS, though" concept.
(I have made an audio visualizer utilizing css animations, transitions, filters and so on... On weaker GPUs it performed badly - as expected. Now I think about creating a simple concept game, using purely power of js, css and htmlDOM - no canvas... I think "Chrome Racer" was also done without jsCanvas)

Thank you for any reasonable input.




Spring web MVC ContentNegotiationConfigurer favorPathExtension only for one endpoint

In a web MVC Spring application, I can configure the app to favor the extension of the request path to determine the requested media type over the 'accept' headers.

Adding:

  @Override
  public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
      configurer.favorPathExtension(true);
  }

to my Spring web configuration, will favor the path extension over the accept header the client sends.

For instance, for the following HTTP request:

POST http://somehost:8080/some/path.xml HTTP/1.1
accept: application/json
...

On that example, Spring will 'think' the client accepts xml and not application/json.

If I change the configurer like this:

configurer.favorPathExtension(false);

spring will ignore the xml 'extension' and use the application/json header.

My question is, can I configure Spring to not favor the path extension for only one endpoint?

For instance, if I have a controller with multiple endpoints:

@RequestMapping(value="/myEndpoint1", ...
...
@RequestMapping(value="/myEndpoint2", ...

I would like to know if is possible that all endpoints except myEndpoint1 favor the path extension over the accept header.




Domain and Corporate Email ownership transfer

Need help, following is the case :-

I am working on a project for my client. A website for their business. they already have an old one from another developer. So I am developing the new one.

Info about website:-

1) website domain is registered with godaddy, hosting is done by Hostgator.

2) Corporate Email is a G Suite for business which is related to domain like abc@CompanyName.com

So the thing is, I will be responsible for support and maintenance of new website. So I need Domain, Email ownership without interrupting my clients business as they rely on Emails.

What is the best way to get ownership of Domain, G-Suite Email.




RegExp function with long text

I have a book with footnotes which I want to display.
I put the footnotes in their place inside curly brackets.

In order to retrieve the comments and display them in a different window, I wrote the following class in Angular 2:

export class BookreaderComponent implements OnInit {

async comments() {
    var regexp = new RegExp('\{(\s*?.*?)*?\}');
    var array= await regexp.exec(this.book);
    console.log(array);
  }

  constructor(public appServices: AppServices, private http: Http, private route: ActivatedRoute) { }
  book: string;
  Name: string;
  json: string;
  ngOnInit() {
    this.route.params.subscribe(params => {
      this.Name = params['name'];
      this.http.get("./assets/" + params['url'])
        .map(ref => {
          return ref;
        }).subscribe(async ref => {
          this.book = ref.text();
          await this.comments();
        });
    });

  }

The class calls the comments function, which calls a regex function on a large amount of text, that contains a lot of curly-bracketed text. The problem is that the regex function takes a very long time to load (I waited and waited, and it didn't load), and meanwhile the whole page is stuck.

Is there a way to speed this up, or maybe break this up into smaller chunks? Or maybe I should try a different way to display these footnotes?




What's the point of making soft/hardware if there is already better tech everywhere? [on hold]

I really wanted to write less, but it seems that "this question body does not meet stackoverflow's quality standards ", so here is the only thing I wanted to say: Is it all about just not starving anymore?




IOS Devices add website to homescreen as web app not shortcut

I am trying to find the correct way to code a similar site that would allow the user to add it to their homescreen. Then when opened it would open not as a shortcut to safari but as a web app of its own. You can see this in the fedex example below. You can see I have both safari and the web app open at one time. The web app has no address bar or safari navigation. enter image description hereenter image description here

Please direct me to what this is called as I can not find information on how to achieve this on iOS




Access and change code for other web page

I have two web pages : page_A and page_B .

I need to change the code for page_B as soon as I click on a specific button that exist in page_A . How can i do this ? Or what should i use to get what i want ?

Note : page_A & page_B are both in the same folder .




My popout window does not stay in focus

I have a button on a site that brings up a new window. I want this window to stay in focus weather or not I leave the browser tab logged in or close the original window.

By this I mean, we have users logging into the dashboard. Navigate to the pop-out window we want to leave open and click the button that sets up window#2 to never expire and auto-refresh at midnight each night.

If I leave the window#1 logged in, it takes focus when the session times out.

Is there a fix to leave window#2 in main focus without letting window#1 get in the way of the view?




Interact with/Consume audio device via web application (desktop and mobile)

I'm searching for a way to consume user's audio device via a web application using most popular modern desktop/mobile browsers.

The only option that I find so far is the one below, but unfortunately it is only supported in Chrome:

http://ift.tt/1npwHAR

Any ideas would be much appreciated.




WWW Page Java Parser - Ctrl + C Ctrl + V

I'm new programmer in java and I have a problem with my parser. Exactly I try to get data from source page and i know how to do that.

But another www page doesn't have any data included in page source.

Is it possible to do using Java with data/text line on this page something like Ctrl+C and copy to file or wherever I want?

I have access only to view this page like evry normal users on Internet.

Thanks for your help!




Netty Nio read the upcoming messages from ChannelFuture in Java

I am trying to use the following code which is an implementation of web sockets in Netty Nio. I have implment a JavaFx Gui and from the Gui I want to read the messages that are received from the Server or from other clients. The NettyClient code is like the following:

public static ChannelFuture callBack () throws Exception{

    String host = "localhost";
    int port = 8080;
    try {
        Bootstrap b = new Bootstrap();
        b.group(workerGroup);
        b.channel(NioSocketChannel.class);
        b.option(ChannelOption.SO_KEEPALIVE, true);
        b.handler(new ChannelInitializer<SocketChannel>() {
            @Override
            public void initChannel(SocketChannel ch) throws Exception {
                ch.pipeline().addLast(new RequestDataEncoder(), new ResponseDataDecoder(),
                        new ClientHandler(i -> {
                            synchronized (lock) {
                                connectedClients = i;
                                lock.notifyAll();
                            }
                        }));
            }
        });
        ChannelFuture f = b.connect(host, port).sync();
        //f.channel().closeFuture().sync();

        return f;
    }
    finally {
        //workerGroup.shutdownGracefully();
    }
}

public static void main(String[] args) throws Exception {

    ChannelFuture ret;
    ClientHandler obj = new ClientHandler(i -> {
        synchronized (lock) {
            connectedClients = i;
            lock.notifyAll();
        }
    });
   ret = callBack();
        int connected = connectedClients;
    if (connected != 2) {
        System.out.println("The number if the connected clients is not two before locking");
        synchronized (lock) {
            while (true) {
                connected = connectedClients;
                if (connected == 2)
                    break;
                System.out.println("The number if the connected clients is not two");
                lock.wait();
            }
        }
    }
    System.out.println("The number if the connected clients is two: " + connected );
    ret.channel().read(); // can I use that from other parts of the code in order to read the incoming messages?
}

How can I use the returned channelFuture from the callBack from other parts of my code in order to read the incoming messages? Is it possible to call callBack just once? And then from my code to do something like ret.channel().read()?




how to write a link in python in two different lines?

i have the following code i want to write the links i two different line but i can't your the triple quotation """ and i want a valid way to do that :

toy_story data

toy_story = media.Movie("Toy Story", "A story of a boy an his toy that come to life", "http://ift.tt/2lR4mwv", "https://www.youtube.com/watch?v=KYz2wyBy3kc")

avatar data

avatar = media.Movie("Avatar", "A marine on an alien planet", "http://ift.tt/2zyOiD7", "https://www.youtube.com/watch?v=5PSNL1qE6VY")




How to create a background effect

First of all I apologize if the question is too broad to answer, but I just need the direction for approach. How to create a background animation like ( the red stripe background ) : link

I am learning css animation, and wanted to know the direction I can approach to get the effect like this.




Custom authentication system look like Facebook.

Could someone tell me how to implement this solution?

Problem description: We have an "A" system that stores user data. There is also a whole network of systems B, C, D where I would like to implement the "Login through" button to log on to one of the accounts on the system A. (Mechanism as this Facebook, however, with its own authorization server).

I would like to do this in Symfony3.

Any suggestions on how to create such a mechanism? How to play on the content?

On the web I came across the information that this allows oAuth2, but how to get the desired effect? Maybe someone met a similar problem?

Regards, Rafał Malik




Get count the hit of website homepage and append to the text file on tomacat server

How to get count the hit of website homepage and append to the text file




How to embed a PDF file in a website to be able to edit it

I would like to know if you know of any service to be able to edit pdf files online without having to download them.

My idea is to integrate this service in my web server and through some online pdf viewer I can edit the pdf.

I have contacted Adobe and a representative has told me that they do not offer this service, I do not know if adobe has any service asin or if you know someone

Thank you




autoit ie send data to web-object

I'm making automatic function tests for my web-site. I have there with content, like here. I'd like to simulate left mouse click there and pasting of this data (for example):

<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="-1.958426666665918" y2="1.165093321012586"/><atom id="a2" elementType="C" x2="-3.2919733226642123" y2="0.39509332717258694"/><atom id="a3" elementType="C" x2="-3.2919733226642123" y2="-1.145093327172587"/><atom id="a4" elementType="C" x2="-1.958426666665918" y2="-1.915093321012587"/><atom id="a5" elementType="C" x2="-0.6246933440024536" y2="-1.145093327172587"/><atom id="a6" elementType="C" x2="-0.6246933440024536" y2="0.39509332717258694"/><atom id="a7" elementType="C" x2="-4.756475622357591" y2="0.8710857706922682"/><atom id="a8" elementType="C" x2="-5.6617938117211795" y2="-0.3747067232897079"/><atom id="a9" elementType="N" x2="-4.756723285285446" y2="-1.6206038846117412" lonePair="1"/></atomArray><bondArray><bond atomRefs2="a1 a2" order="2" id="b1"/><bond atomRefs2="a2 a3" order="1" id="b2"/><bond atomRefs2="a3 a4" order="2" id="b3"/><bond atomRefs2="a4 a5" order="1" id="b4"/><bond atomRefs2="a5 a6" order="2" id="b5"/><bond atomRefs2="a6 a1" order="1" id="b6"/><bond atomRefs2="a7 a8" order="2" id="b7"/><bond atomRefs2="a2 a7" order="1" id="b8"/><bond atomRefs2="a8 a9" order="1" id="b9"/><bond atomRefs2="a3 a9" order="1" id="b10"/></bondArray></molecule></MChemicalStruct><MElectronContainer occupation="0 0" radical="0" id="o1"><MElectron atomRefs="m1.a9" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a9" difLoc="0.0 0.0 0.0"/></MElectronContainer></MDocument></cml>

This code is working preaty fine:

#include <IE.au3>
main()
func main()
local $sQuery = "<cml><MDocument><MChemicalStruct><molecule molID=""m1""><atomArray><atom id=""a1"" elementType=""C"" x2=""-1.958426666665918"" y2=""1.165093321012586""/><atom id=""a2"" elementType=""C"" x2=""-3.2919733226642123"" y2=""0.39509332717258694""/><atom id=""a3"" elementType=""C"" x2=""-3.2919733226642123"" y2=""-1.145093327172587""/><atom id=""a4"" elementType=""C"" x2=""-1.958426666665918"" y2=""-1.915093321012587""/><atom id=""a5"" elementType=""C"" x2=""-0.6246933440024536"" y2=""-1.145093327172587""/><atom id=""a6"" elementType=""C"" x2=""-0.6246933440024536"" y2=""0.39509332717258694""/><atom id=""a7"" elementType=""C"" x2=""-4.756475622357591"" y2=""0.8710857706922682""/><atom id=""a8"" elementType=""C"" x2=""-5.6617938117211795"" y2=""-0.3747067232897079""/><atom id=""a9"" elementType=""N"" x2=""-4.756723285285446"" y2=""-1.6206038846117412"" lonePair=""1""/></atomArray><bondArray><bond atomRefs2=""a1 a2"" order=""2"" id=""b1""/><bond atomRefs2=""a2 a3"" order=""1"" id=""b2""/><bond atomRefs2=""a3 a4"" order=""2"" id=""b3""/><bond atomRefs2=""a4 a5"" order=""1"" id=""b4""/><bond atomRefs2=""a5 a6"" order=""2"" id=""b5""/><bond atomRefs2=""a6 a1"" order=""1"" id=""b6""/><bond atomRefs2=""a7 a8"" order=""2"" id=""b7""/><bond atomRefs2=""a2 a7"" order=""1"" id=""b8""/><bond atomRefs2=""a8 a9"" order=""1"" id=""b9""/><bond atomRefs2=""a3 a9"" order=""1"" id=""b10""/></bondArray></molecule></MChemicalStruct><MElectronContainer occupation=""0 0"" radical=""0"" id=""o1""><MElectron atomRefs=""m1.a9"" difLoc=""0.0 0.0 0.0""/><MElectron atomRefs=""m1.a9"" difLoc=""0.0 0.0 0.0""/></MElectronContainer></MDocument></cml>"
local $oIE = _IECreate ()
_IENavigate ($oIE, "http://ift.tt/2j2e8sR", 0)
_IELoadWait($oIE)
MouseClick("left", 403, 572, 1, 1)
ClipPut($sQuery)
Send("^v")
;Some other stuff to do
endfunc

But i'd like to avoid using of mouse in tests.

As I understand, data is somehow imported to this object, but I haven't found any SendToObject() methods in ie.au3 documentation.

<canvas width="1198" height="914" class="mjs-canvas" id="canvas" tabindex="0" style="width: 1198px; height: 914px;"></canvas>

Or it should be sent with json to server? Where can I get some related to this issue information? How does influence on a solution?

Thank you for your attention.




How does website detemine what's the full url when accessing resources like "/file.png"

I have a resource in my code that looks like that:

<img src="/upload/file.jpg">

when I open the resource, it looks like "http://ift.tt/2zy0CDv"

how does the website determine that the "base url" is "myapp.dev/en" and not "myapp.dev"? the file is accessible on "http://ift.tt/2nguAug" and i can hardcode it, but I want the "proper" solution.

if that helps I work with laravel




Web develoopement in using Java in Netbeans

Is there dual view feature in NetBeans for web development? That is separate views for both design view and source code view just like in Visual Studio or in Dreamweaver?

Thanks in advance




Forbidden (403) CSRF verification failed. Request aborted when login to admin mezzanine

i deploy project web into server but when i login addmin page it has an error "Forbidden (403) CSRF verification failed. Request aborted." . It's normal when i test in local.

my project used mezzanine cms and i use default login of mezzanine

I need some help




mardi 28 novembre 2017

Hello Everyone. Can anyone help me how to do form error message after submit button, Here my codes I tried but i couldn't get.

Can anyone help me how to do form error message after submit button, Here my codes I tried but i couldn't get it.

 <form method="POST"  >
                    <h2>Contact Us</h2>
                    <label>Name</label>
                    <input type="text" name="contactName" class="form-control" placeholder="e.g. John Lim" required  />
                    <br />
                    <label>Email</label>
                    <input type="email" name="contactEmail" class="form-control" placeholder="Email" required />
                    <br />
                    <label>Phone Number</label>
                    <input type="tel" name="contactNumber" class="form-control" placeholder="e.g. +60 11111111" required />
                    <label>Description</label>
                    <textarea class="form-control" type="text" rows="5" cols="5" name="contactDesciption" placeholder="Briefly describe the bespoke talent you wish for us to identify for you in 200 words." required> </textarea>
                    <button class="btn" type="submit" formmethod="post">Request Talent</button>
                </form>


input:required {
    border: 1px solid red;
}
input:valid {
    border: 1px solid black;
}




how to open css when I changed the default program

I am trying to create my first web page. The style part of the code was suposed to change the background color, but it dont. By mistake I changed the default way to open css files to "skype" and this created a problem. I changed it to notepad, but that did not fix the problem and I cant remember the default program to open it. I dont know if this is the source of my problem or if it is the code.

<!doctype html>
<html>

  <head>
    <title> My web Page </title>  
    <style>
      body {
      background:red;
      }
    </style>
  </head>

  <body>   
    <h1>  My webSite</h1>
    <h2> This is my homepage content</h2>
   </body>

</html>




Web Scraping your own Twitter followers

Does anyone have experience using the Web Scraper Chrome extension to extract Twitter followers? I get it to work, but I can't get it to extract all followers. I've never done any webscraping techniques before.




What is reference and How to know reference of the object in javascript

What is the reference in object and how to see the reference allocated to the object in javascript.I used lodash _.clone() in an object and i made a example bellow

var  Obj = {id : 0, box: 0, ei : 0};
        var model = {id : 0,ob : [{c: 1, a: 0}],com: _.clone(Obj)};
        var old=_.clone(model)
        old.id=1;
        console.log(old.id===model.id); //false correct
        old.com.id=1;
        console.log(old.com.id===model.com.id);//true

while updating the old.id as 1 the model id has not updated,But while updating the old.com.id as 1 now the model.com.id has also updated why?




How to make installer for web application?

Anyone know how to make installer for web system? I created a web system and wanted to make the installer to make it easier to install the web.




Nginx error with location block selection

So, I was building a site with Gitbook. It came across with the Nginx configuration problem. Basically, I want to form a standard in which when people are visiting: http://ift.tt/2zxsfwv, it will redirect to that specific book. However, I am very new to Nginx and the location block that I wrote is not correct. I will have the directory tree below.

book/
├── [root     4.0K]  _book/
│   ├── [root     4.0K]  gitbook/
│   ├── [root     5.9K]  index.html
│   └── [root      970]  search_index.json
├── [root     4.0K]  book_name
│   ├── [root     4.0K]  _book/
│   │   ├── [root     4.0K]  gitbook/
│   │   ├── [root     5.9K]  index.html
│   │   └── [root      568]  search_index.json
│   ├── [root       16]  README.md
│   └── [root       40]  SUMMARY.md
├── [root       45]  README.md
└── [root       40]  SUMMARY.md

Worth to mention the _book under the book is the main directory for the site and I will have the hyperlink to redirect to other book. The _book under book_name will be the book.

And here is the configuration for Nginx, I thought the $uri contains the book_name in it, so I can just access the _book folder under the $uri and get the index.html file. This will give a 500 error.

server {
    listen 80;
    listen [::]:80;
    server_name book.domain.com;

    location /.well-known/acme-challenge {
        root /var/www/http://ift.tt/2nbMHS1;
    }

    return 301 http://ift.tt/2zxsg3x;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name book.domain.com;

    ssl_certificate /etc/letsencrypt/live/http://ift.tt/2ni1Lh8;
    ssl_certificate_key /etc/letsencrypt/live/http://ift.tt/2zxsh7B;

    root /var/www/domain.com/book;
    index index.html;

    location / {
        try_files $uri $uri/_book;
    }
}

However, I also tried another way to write it by adding another location block, but it is also not working. This will give me a 404 error.

location /book_name {
    root /var/www/domain.com/book_name;
}

I was thinking maybe rewrite is the correct way to do it ? and was really confused when writing the location block. What is the correct way to do it?




not able to read data from json using angular services

I know this has been answered around my question many times but still i did not get exactly what I want. I read others answers.

what I am trying to do is read data from the json file using angular service and then send the data to be played by with my controller.

my Service looks like this :

angular.module("app",['ngRoute','ngAnimate', 'ngSanitize', 'ui.bootstrap'])
    .factory('webtest', function($q, $timeout, $http) {
        var Webtest = {
            fetch: function(callback) {
                return $timeout(function() {
                    return $http.get('docs/cats.json').then(function(response) {
                    return response.data;
                });
            }, 30);
        }
    };

    return Webtest;
});

My controller looks like this:

(function () {
'use strict';

angular
    .module('app')
    .controller('catController', Controller);


function Controller($scope,webtest) {

 webtest.fetch().then(function(data) {
        console.log(data);     <---------Correct value
        $scope.cats = data

    });
 console.log($scope.cats) . <----------------Empty array
 }


})();

My problem is that both the console log shows different values. data shows all the json values exactly what i want. but #scope.cats show me empty array.

can you help me !Please




What happens if the 50K user tries to log in at the same time? [on hold]

How can this affect our web app and How we can overcome with this?

What step should we take?

I'm using MongoDB.

I googled it but no answer.

-- Thank you




Strange boolean value bug in javascript

Not sure what is happening to the boolean value in the found property of this object. When I log the object the value is true then when I log just the property value it's false!

Im receiving this object from another developers code. I have confirmed that the object his code is passing my script is the same as the object that Im logging in my script. I have also tried multiple browsers and tried emptying the cache before running the application. Any idea why I'm not able to access the correct value for this property?enter image description here

var buildGraph_bfs = function(jsonData) 
{

//console.log("console.log(jsonData) : ");
//console.log(jsonData);
//console.log("console.log(jsonData.found) : " + jsonData.found);

var FOUND = jsonData.found;

if (FOUND) 
{
 console.log("found");
}
else{
  console.log("not found");
}

For the above code I always get "not found". The value is never altered in the following script.




Serving Unity3D game through web

I've been assigned the task to serve a Unity3d game in my website (designed by someone else). They're flexible on serving the game directly from the website as they don't know if it s possible, so in the case that due to X issues it can't be possible I could provide a link (download a player?) to play the game externally. I've been digging through the Unity docs and found out the Unity Webplayer is only compatible with Opera, Safari and older versions of Firefox/I. Usually I'd dig into the matter and come up with a solution eventually but due to the time constraint I feel hard pressed to ask for advice from people who have already jumped these hoops.

Is there an alternative to the Unity Webplayer, does Unity provide some sort of quick, lightweight install for the game to which I can point users to from the website?

I should add that the game will be a lightweight, resource-inexpensive game.

I'm open to any and all suggestions however creative!

The app will most probably use the Rails framework for the web app.




HTML display different content on projector screen

I want to display certain HTML on the projector and have something else on the main screen, like in PowerPoint when you use a projector, for example. Is this possible with HTML, or anything else in the web?




How Can I Save This Web App?

http://ift.tt/2AfK72t

I'd like to be able to access this boat race tracker should the company take it off the web in the future.

Is there a way to save everything that's on their server so I could host it on my own?




Multiple forms or everything in a single form?

I am building a school test managing web application in PHP and JavaScript (jQuery). In a nutshell, teachers can make tests with multiple tasks and students can solve them, and the system would evaluate the tests. Creating a testsheet is easy (title, description, class, subject etc.), it's one form, I submit it, and I insert the data into the database. But there's this part, when a window comes up to create the tasks for the previously created testsheet. Each task has attributes (the question, type of the task, possible answers etc.). I think it is really similar to Google Forms.(As far as I inspected Google's method, they did't even use forms.) How should I make this? Each task needs a new form (like create one task at a time, submit it, and user clicks 'Next', and a new form comes up), or all the task should be created in one form? (all task boxes are listed when the page loads) But in the latter case, how can I handle the POST data in PHP? Thanks in advance.




Looping through Multiple pages while scraping with python

I am trying to parse multiple page on IDMb. The parser is stuck on gathering information from one page. I have tried many forums to solve this to no avail. I suspect it has something to do with not setting up my embedded loop correctly or my initial request. Please help. Thanks.

Problems with this script: Loops on one page.

#Basic libraries

from requests import get
from bs4 import BeautifulSoup
import pandas as pd
from random import randint

#More advanced libraries
from time import sleep
from time import time
from IPython.core.display import clear_output
from warnings import warn

base_url = 'http://ift.tt/2hZ3Usi'
response = get(base_url)

soup = BeautifulSoup(response.text, 'lxml')

#data lists to append

names           = []
years           = []
imdb_ratings    = []
metascores      = []
votes           = []

#preparing the monitoring loop

pages =  str(range(1,5))

start_time = time()
requests = 0

#for every page in the interval 1-4
for url in urls:

#make a get request
    response = get(base_url + page)

#pause the loop
    sleep(randint(8,15))

#Monitor the requests
    requests += 1
    elapsed_time = time() - start_time
    if requests > 4:
        warn:('Number of requests was greater than expected.')
        break

    elif response.status_code != 200:
        warn('Request: {}; Frequency: {} requests/s'.format(requests, response.status_code))

    else:
        print('Request: {}; Frequency: {} requests/s'.format(requests, requests/elapsed_time))
        clear_output(wait = True)

    page_html = BeautifulSoup(response.text, 'lxml')  

#root
    movie_containers = soup.find_all('div', class_= 'lister-item mode-advanced')

#looping through containers
for container in movie_containers:
    if container.find('div', class_ = 'ratings-metascore') is not None:

        #The name
        name = container.h3.a.text
        #print(name)
        names.append(name)

        #The Year
        year = container.find('span', class_ = 'lister-item-year').text
        #print(year)
        years.append(year)

        #IDMb rating             
        imdb = container.strong.text
        #print(imdb)
        imdb_ratings.append(imdb)

        #Metascore              
        metascore = container.find('span', class_= 'metascore').text
        #print(metascore)
        metascores.append(int(metascore))

        #Number of Votes
        vote = container.find('span', attrs = {'name':'nv'})['data-value']
        #print(vote)
        votes.append(int(vote))


#keeping track of data        
test_df= pd.DataFrame({'Movie': names,
                        'Year': years,
                        'IMDb': imdb_ratings,
                        'Metascore': metascores,
                        'Votes': votes})
print(test_df.info())
test_df

`




MYSQL/PHP Select A Users Ranks

Hi I have A MYSQL Database Thats Like This

|id|username|password|rank  |
|1 | jeff   | Passwor| admin|
|2 | bob    | passow | user |

how would i use php to fetch it and assign it a variable




Using .htaccess DirectoryIndex prevents from loading assets

So I have a bit of a problem. I've just uploaded my website files on a hostgator shared hosting server. I need to configure the .htaccess file in the so that the index directory is /me/web/app.php. I've written a simple

DirectoryIndex /me/web/app.php

and it redirects correctly, except that none of the assets are loaded. No css, images, etc. Whereas, when I load directly http://ift.tt/2ndM0HS, it works fine.

I guess my question is, what's going on here?

This is symfony 3 project, by the way. In case that's relevant.




Using C to output a key on a web page

Is there any way I can use ANSI C to output words onto a web page? Or if I'm completely off, what language (or script) is used to do this sort of stuff?

I wanna try this since I just found a website (virtualpiano), and now I want to make some kind of programming that can read out the "notes" and play it on the virtual piano.

Thanks a bunch!




Generate random on server site

I would like to generate a random value (for example number) on my server, but the clients (users) need to be sure about the randomness. It is possible? Which technologies or concepts do I need?

Example:

Client1 sends a request to my web server and send me some data.

Client2 sends a request to my web server and send me some data.

Client3... and so on.

Then I generate an "open" random and show it on my webpage. The crucial aspect is, that they all need one random but don't trust me.




Select a point on a map and display it on an input

I would like to know if there's a way to show a map on a form, select a point on that map and display the address in an input like a textbox and viceversa (to write an address in that textbox and show a point on the map), and save that address in a variable.

It would be very useful something like an <input type="map"> with its own properties but I don't know if that exists.




EXT JS IF FUNCTION

I have form which contains textfield. Need to run query if this textfield will contain value - 'test15'. Value 'test15' filled by system (read only for user)

             xtype: "textfield",
                fieldLabel: "...",
                name: "TRAIN1",
                readOnly: true,
                labelWidth: ...,
                width: ...,
                allowBlank: (...) ? false : true

so query should be like:

IF FIELD TRAIN1 = 'test15'
Order.query('Query1')[0].enable()




Django FileUpload choice inside of a dropdown (ModelChoiceField)

Hi is it possible to put a choice inside of a dropdown and when it is clicked it will allow user to upload file, right now I have a dynamic dropdown built using ModelChoiceField but I want to add a choice that will allow the user to upload the file if they don't want to choose to use the default choices.

Something like the one in the picture but when the '------------' choice is clicked it will pop up something that will allow user to upload file.

Image example

I've been looking for the answer but couldn't find one unfortunately. thanks.




Double onclick events not working

I have a tab menu on my website and the code used for it works perfectly. JavaScript:

function openTab(tabName) {
    var i;
    var x = document.getElementsByClassName("tab");
    for (i = 0; i < x.length; i++) {
        x[i].style.display = "none";
    }
    document.getElementById(tabName).style.display = "flex";
}

HTML:

<div class="col-md-4">
    <div onclick="openTab('tab-1')" class="tab-button">
        <h5>IT Problems</h5>
    </div>
</div>
<div class="col-md-4">
    <div onclick="openTab('tab-2')" class="tab-button">
        <h5>Save Time</h5>
    </div>
</div>
<div class="col-md-4">
    <div onclick="openTab('tab-3')" class="tab-button">
        <h5>Cost Effective</h5>
    </div>
</div>

And then obviously I applied the IDs ("tab-[1/2/3]") and classes ("tab") to the divs I want as tabs. However, when I replicate the exact same code to have a tab button highlighted for the current tab open, it doesn't work. JavaScript:

function selectedTab(selectName) {
    var i;
    var x = document.getElementsByClassName("select");
    for (i = 0; i < x.length; i++) {
        x[i].style.border-bottom-color = "#dbdbdb";
    }
    document.getElementById(selectName).style.border-bottom-color = "#25a7df";
}

HTML:

<div class="col-md-4">
    <div onclick="openTab('tab-1'); selectedTab('select-1')" class="tab-button">
        <h5 id="select-1" class="select">IT Problems</h5>
    </div>
</div>
<div class="col-md-4">
    <div onclick="openTab('tab-2'); selectedTab('select-2')" class="tab-button">
        <h5 id="select-2" class="select">Save Time</h5>
    </div>
</div>
<div class="col-md-4">
    <div onclick="openTab('tab-3'); selectedTab('select-3')" class="tab-button">
        <h5 id="select-3" class="select">Cost Effective</h5>
    </div>
</div>

I've looked literally everywhere online and had multiple people look at this and nobody can find a solution. Can anyone help?




https www to non www https not working using htaccess

I am trying to www to non www redirect with some conition 1) http to https 2) www to non www 3) and add slashes at end

My Code is

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\.[a-z0-9]+$ [NC]
RewriteRule ^(.*[^/])$ http://ift.tt/2juHNuq [L,R=301]

RewriteCond %{HTTP_HOST} ^sitename\.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteCond %{HTTP_HOST} ^www\.sitename\.com [NC]
RewriteRule ^(.*)$ https://sitename.com/$1 [L,R=301]

This code works fine but only 1 condition not works for me The code works for http to https add slashes at end www to non www

Condition which works fine are 1) http://ift.tt/2ju57bx (it redirect if abc exist but if abc is 404 it not works)

2) http://ift.tt/2hXx5fp

3) http://ift.tt/2juHPCy

all redirect to http://ift.tt/2hXVp0w

But the condition which not work for me is

5) http://ift.tt/2jtVadZ (no slashes) it not redirect to http://ift.tt/2hXVp0w

So final observation is that if there is a 404 page then it not works fine with www.

Live example: http://ift.tt/2hZMVGs (This is not working) http://ift.tt/2juHQX8 (This is working)




php client server on web host cant bind

I want to Run a simple Client-Server socket PHP script on my web host. But i don't know how to exactly specify IP address and port number to work.

I test then on my wammp with success, but wen i upload them on my host control panel and run, they are not works.

Here is my codes:

Client

<?php
$host    = "105.24.123.188";
$port    = 8080;
$message = "hello";
echo "Message To server: ".$message. "<br>";
// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");
// connect to server
$result = socket_connect($socket, $host, $port) or die("Could not connect to server\n");  
// send string to server
echo "After connect: ".$result. "<br>";
socket_write($socket, $message, strlen($message)) or die("Could not send data to server\n");
// get server response
$result = socket_read ($socket, 1024) or die("Could not read server response\n");
echo "Reply From Server: ".$result. "<br>";
// close socket
socket_close($socket);
?>

Server

<?php

$host = "105.24.123.188";
$port = 8080;
// don't timeout!
set_time_limit(0);
// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) or die("Could not create socket\n");

if (!socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1)) {
    echo socket_strerror(socket_last_error($socket));
    exit;
} 
//echo "reached \n";
printf("this1\n");

// bind socket to port
$result = socket_bind($socket, 0, $port) or die("Could not bind to socket\n");
// start listening for connections
$result = socket_listen($socket, 3) or die("Could not set up socket listener\n");
///echo "reached \n";
printf("this2\n");
// accept incoming connections
// spawn another socket to handle communication
$spawn = socket_accept($socket) or die("Could not accept incoming connection\n");
// read client input
$input = socket_read($spawn, 1024) or die("Could not read input\n");
// clean up input string
$input = trim($input);
echo "Client Message: ".$input. "<br>";
// reverse client input and send back
$output = strtoupper($input) . "\n";

socket_write($spawn, $output, strlen ($output)) or die("Could not write output\n");
// close sockets
socket_close($spawn);
socket_close($socket);
?>

[Error]

Client Message To server: hello After connect: 1 Reply From Server: HTTP/1.1 400 Bad Request

Server

can't bind

I cant find out how to run my simple example on web server. IP address and port checked they are valid and open.




Twython does not get back next_results

I am trying to get more than 100 tweets by twython but it does not get back next results in search_metadata of results. It get:

{'completed_in': 0.098, 'max_id': 935489442785251328, 'max_id_str': '935489442785251328', 'query': '%22iran%22+-filter%3Aretweets', 'refresh_url': '?since_id=935489442785251328&q=%22iran%22%20-filter%3Aretweets&include_entities=1', 'count': 100, 'since_id': 0, 'since_id_str': '0'}

any suggestion, what is the problem?




Save Json response of web api get method in database

When I click on get web API link the response will come in JSON format on browser page I need to save that response to SQL database




trying to add front end to website to view admin input

I have created an admin side to a website where i can add/delete/edit and want a make a front-end page where another person can just view the website without seeing the admin actions (add/delete/edit)

so basically the admin will be in its own folder but the folder will be in the same directory as the front-end




How to check if the element selected/clicked is multiple of "n" using jquery?

I have 'n' li elements inside a ul. I want to alert a message only if the li selected/clicked is a multiple of "n"(let it be 3).

In the below example, the alert must be shown only if I click the 3rd, 6th, and 9th li element:

<ul>
    <li>list item 1</li>
    <li>list item 2</li>
    <li>list item 3</li>
    <li>list item 4</li>
    <li>list item 5</li>
    <li>list item 6</li>
    <li>list item 7</li>
    <li>list item 8</li>
    <li>list item 9</li>
</ul>




Size of page without scrolls

Hi i need get the page size without scrolls.

What´s the minimum and maximum width and height size www.google.com page without scrolls?

I trying document.body.scrollHeight document.body.scrollWidth, but the size depends of size of window of navigator...

What´s the fixed size of page using a javascript function?

Show me an example please.




httpwebrequest creating duplicate requests in case of timeout

We have created a web service in which we are using httpwebrequest get method. In some cases the request received by the server is duplicated when time out occurs (Not happens with all time out requests). Time stamp of the duplicate requests mentioned below and diffrenece showing some time 45 seconds, sometime 3 seconds and some time same time. Can you provide some solution for the same issue.

u_ex171120.log:2017-11-20 06:12:04 10.1.224.70 GET {url} - PORT - IP - - 200 0 64 0 249 58488

u_ex171120.log:2017-11-20 06:11:19 10.1.224.70 GET {url} - PORT - IP - - 200 0 64 0 249 39219




TCP to WebSockets proxy/bridge?

Websockify is a WebSocket to TCP proxy/bridge. Is there any TCP to WebSockets proxy/bridge exists?




Simulate web user behavior

I'm attending my master degree and I'm working at my master thesis on detection of DDos attacks with statistical instruments. My tutor has told me, first of all, to emulate a single user activity surfing the web and replicate it in a second moment. After this, I will use a statistical instrument that my tutor has just developed on thisemulated traffic, for evaluating the accurance of results.
I'm in trouble with doing this task. I'm asking you if you could give me some indications also in terms of tools or source code, so I will understand how to do it.

Thank you, hope you'll understand it's very necessary for me.




"The selection did not contain any resources that can run on a server" ERROR

So, I have imported this team project from Github and set up a Tomcat. I start Tomcat through the eclipse and try to run our main file "login.jsp" on a server, as shown on this picture.

But every time I try to run it, I receive this error - "The selection did not contain any resources that can run on a server". screenshot of an error. I have tried dozens of solution from going to the Project Facets and swapping for the Dynamic Web to, basically, changing something inside the files but nothing seems to work.




lundi 27 novembre 2017

How to remove ongoing notification in android programmatically?

I want to remove the ongoing notification from statusbar.For example whatsapp web notification when whatsapp web is active,usb debugging notification when device is connected to pc which are not removed when swipe.Is it possible or not?If its possible then please help me.Thank u.....




Displaying graphical content in a webbrowser and interact like an app (Consulting)

I have a running app with vector graphics objects which can be individually clicked. The App is not a game, but should visualize the content at least with a Framerate of 2 per seconds when interacting.

Now I would like to port or run this app for using on a website. The app should be running in parallel with lots of sessions, because there will be lots of users using it in parallel.

I am not sure what is the best way to do with actual technologies in 2018.

  • There are services, which let us run apps on theire servers. -> Not sure if this works properly and stable. I guess sessions are limited and costly.

  • Converting the app into a Chrome app. -> Not sure if this works fine. What I saw is, that we need to install a special Plugin for Chrome, which I dont like the user to do.

  • Creating an Applet ( old Scool ? ), which runs in a frame of an html page. -> Old scool, works different in different browsers. Security issues.

  • Deploying an Java-Application to a Application-Server and creating vector graphics with HTML5 . -> Maybe slow.

Does someone have a hint, what technology to use ? Does Google offer something to show an apk in a browser ?




How to structure MySQL Database and website [on hold]

I'm new to web development, and trying to set up a website that has access to a MySQL database for data to display on the pages. I need to be able to get data from the database and to add new entries.

As far as I understand I cannot/should not do MySQL requests from a web browser. One solution I have read is to be using node.js as my server to be access the database and to be serving web pages to the client, but I am unsure as to how I can then add the entries to the database.

What is generally a good way to structure a website like this?




Developing a web app using PHP and Azure SDK

I want to build a web application using PHP and will like to upload it on the cloud. I will like to use Microsoft Windows Azure SDK to develop the app before deploying it on the Azure cloud.

Please, I need a step by step procedure from the set-up, the software and hardware requirement, configurations. Include any helpful link. Thank you.




MYSQL]Select From 3 Table, But The Result Is Redudance. Hope Anyone Can

I try to make mini social media so, I have 3 table :
Followdata | Status 1 = Following, 0 Not Following :

Emaildari -> EmailKe mean A Follow B

emaildari    emailke   status
 a@a.com     b@b.com      1
 a@a.com     c@c.com      0 
 b@b.com     c@c.com      1
 b@b.com     a@a.com      1
 c@c.com     a@a.com      1
 c@c.com     b@b.com      0


Status :

idstatus   email    des_status
   1      a@a.com      tes1
   2      b@b.com      tes2
   3      b@b.com      tes3
   4      c@c.com      tes4


Users :

  email     username
 a@a.com      ima
 b@b.com      imb
 c@c.com      imc


Myquestion is : how can i show the Status (post) by user email a@a.com and user that following by a@a.com so i get the result like :


Result :

idstatus   username    des_status
   1         ima         tes1
   2         imb         tes2
   3         imb         tes3

Please Help, Thaks in advance.




How to deal with CORs re-directing to Proxy Server

I have a web application that makes a request to a 3rd party api server. This is normally fine, as the 3rd party server has set it's headers properly for CORs. However, I have clients who sit behind a proxy. So all the requests to this 3rd party server gets re-directed and the returned response from the proxy server does not have the headers set up correctly for CORs.

I get this error: Failed to load http://ift.tt/2zvcV3v&types=country,region,place: Redirect from 'http://ift.tt/2zvcV3v&types=country,region,place' to 'http://ift.tt/2AgGyH3' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8787' is therefore not allowed access.

Should the onus be on the client to configure their proxy correctly, or should developers be responsible to figure out a way through this situation?




Best way to stage website with storage

I am doing a bit of preliminary research before designing a webpage that will ultimately function as a log book for information (something like a linked list).

I would like to have this information stored somewhere online (like my github account etc) so that if I want scale my application and move to mobile apps, I will be able to draw from and manipulate the same set of data.

Is anyone familiar with doing something like this? Any tips would be appreciated!




Web app support video call

I am currently developing a web app (using Spring MVC) in which i want to add 1 vs 1 video calls. I know webRTC and many APIs based on that like: twilio, tokbox, agora io etc.

I am asking if anyone have implement something similar in the past, what should i use? Any advice and suggestions will be greatly appreciated.




SVG animation waits for DOMLoad event, timelineBegin="onStart" is not working?

As explained in this page svg animation timeline starts with DOMLoad event has been triggered. But u can change it to svg's load by timelineBegin="onStart".

I want to use svg as a preloaded and it should start animation immidately. Why my animation still waits for DOMLoad event:

<svg id="map" version="1.2" width="100%" viewbox="-2 -2 506.3302 339.85639" xmlns:svg="http://ift.tt/nvqhV5" timelineBegin="onStart">
    <defs>
        <radialgradient id="grad1" cx="0.65" cy="0.78" r="0.08" rx="0.5" ry="1">
            <stop offset="0.8" style="stop-color: #1a1a1a; stop-opacity:1"></stop>
            <stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:1"></stop>
            <animate id="map-animation" attributeName="r" dur="2500ms" from="0.08" to="1.2" fill="freeze"/>
        </radialgradient>
    </defs>
    <path id="map" fill="url(#grad1)" d="m733.83-66.9...>
</svg>




How to develop a project like trivago, policybazaar etc. in Java

Somebody please help me with my questions.

  1. How to develop a website like trivago and policybazaar (a site where I need to compare data/prices)
  2. How can I get the data from various sites for comparison? (Let's say that we have three hotels from which I need to fetch the price. How to fetch price from each hotel's website and list all in my website?)
  3. Which Java Framework should be used to develop this?
  4. Can anybody suggest where I should start?

URGENT

Thanks....




Set selectOneMenu with Jquery

I'd like to set my selectOneMenu with JQuery. I tried this way but it didn't work. Can anyone help me? Thanks.

<p:selectOneMenu class="estado" id="estado" value="#{pessoaBean.pessoa.estado}" required="true" requiredMessage="O campo Estado é obrigatório.">
                        <f:selectItems value="#{listaBean.estados}" var="estado"
                                       itemValue="#{estado}" itemLabel="#{estado.valor}" /> 
                        <p:message for="estado"/>
                    </p:selectOneMenu> 


  $(document).ready(function(){
    $(".cep").change(function(){   
    var servico = "http://ift.tt/1GHHyPw";
    var cep = $(this).val();
    $.getJSON(servico + cep, function(data){
       $(".estado").val(data.estado);
    });
});

});




C# wpf web control

is any way to open a web browser(visible?) in specific browser and do action like clic button, search etc. i try

WebBrowser web = new WebBrowser();
web.Navigate(new Uri("https://www.google.com/"));

but i didnt see it. I too know i can do something like that

System.Diagnostics.Process.Start("chrome.exe","http://www.google.com");

but how then make action there control it? Or the only way is open browse in wpf and show it on some king of window.




.NET C# extract data from excel to word file

I have an Excel file as input contains some data, what I tried to do is extract that data and put into a Word file as output.

From:

Id   | Name   | Age |  
-----+--------+-----|  
  1  | A      |  26 |  
  2  | B      |  30 |

To a Word file like:

Employee (1) : age (26),  
Employee (2) : age (30)

With the pattern of both Excel & Word files are given.

So my question is: can I do that directly?




Directory.Exists always return false

I'm pretty sure that I need to use Directory.Exists() but it always return false in this case.

If (!Directory.Exists(path))

What I trying to achieve is that it will enter the loop only if a network drive is not mapped to the computer. What I tried to do is to check if a path of network drive is already exists and if not -> it will map it. if yes -> he should not enter the if statment. However, it always return false and because of the ! operator enter to the if statement and do the mapping. I guess that Im not doing best with this path... and I should use the Directory.Exists() but I have no idea how to fix it. Any suggestions please?




audio playlist in react

i'm trying to get a playlist working in a small react app. if i use react-howler the tracks progress as they should, but theaudio gets muted with the mute button on ios. if i use react-player it gets around the mute button, but the tracks don't progress correctly on ios. both work just fine on desktop. anyone solved this issue? know of a plugin that addresses both problems?

http://ift.tt/2hWTd9T




How can i configure my vps as a web proxy server?

i have a Ubuntu VPS and i want to use it as a web proxy server , what should i do ? does it need a client side configuration like a VPN app? is it possible to rub Tor in server and proxy all connected users traffic ?




Need help choosing the skill sets to learn full stack web developer

I am not sure if this is the right platform to ask this question. Anyways, giving it a go.

I just started learning web design and development mainly through w3schools, code academy and Lynda\Udemy video tutorials online.

My goal is to complete the training by March 2018 and get a job and work for 2 to 3 years along with few freelancing projects. In this 2 - 3 years planning to learn Python, Ruby On Rails, C, C++, Java and Android App Dev. Later, I am planning to start my own Design/Development firm.

Till now I have completed HTML, CSS, Javascript and Photoshop. I need help in choosing the languages and skill sets going forward.

I have listed below the languages I think I should learn by March 2018.

HTML5, CSS, Photoshop, Javascript, Bootstrap, jQuery, jQuery UI, jQuery Mobile, Angular JS, React, Node.js, Mongo DB, PHP, Codeignitor/Laravel, My Sql, Wordpress, Wordpress Theme Development, SEO (Only basics), Dreamweaver.

Could you please let me know if I am on the right path? Is it too much to learn for a beginner? Is the time frame reasonable?

I am dedicating about 10 hours in a day 6 days in a week. Is it fine to learn just HTML, CSS, Photoshop, JS, jQuery, PHP, My Sql and Dreamweaver to get placed or Am I better off learning all the above listed skills?

As I said, My short term priority is to get placed by March 2018.

Thank you in advance.




How can I uniquely identify a users request

Scenario: A user types in your URL and hits enter The browser loads a page The page makes calls for its resources (css, js, images etc) So if we say that there are 1 resource for each type given then we now have 4 requests in total that were made to the server by the users browser.

Is it possible to tell in all scenarios (anything you can think of) what is the originating request by the user and what is a request by the item requested by the user?

I have a similar question out there dealing with Logback but this post above is detached from that.




IIS 8.5 on Server 2012 R2 stops responding after a time

I recently updated a server from 2008 R2 to 2012 R2 that hosts a few MVC sites and a Web API. After deployment, everything seems to work fine for a few days before the web api seems to fail. It returns a 404 for all requests to the API from the failure forward. The parent MVC site seems to continue working fine.

A few things:

  • The web api is hosted as a web application inside a parent website within iis.
  • This is a 4.6.2 framework site and api.
  • I would prefer it to be its own site but I don't control this.
  • It seems to stop at roughly the same time when it occurs - around 2:35 AM
  • The only route defined by the web api is a GET

I've checked the event log as well as IIS logs. The event log doesn't reflect anything during these times and the IIS logs just show a 404 response. Resetting IIS/AppPools/etc... don't fix the api nor does restarting the machine. In fact, the only thing that seems to fix it temporarily is a VS publish over top of site.

I suspect something to do with MSDeploy but have nothing concrete. Does anyone have any ideas on where to look or what to look for? I feel it must be something to do with the server configuration as we've never seen this problem prior.




RESTful Webservice

as it's already stated in the title, I am looking for an answer concering Restful Webservices. The problem I have is that multiple sources (xml, images) are supposed to be POSTed in a single request/response simultaniously. Does anyone have a "buzz word" or something related that I could start with? Thanks in advance. (via HTTP /-s)




Web Report Designer

Need suggest for a web-based report designer that I could embed in my product.

Requirements:

  • Report should have similar capabilities of Birt/jaspersoft
  • Reports would be like invoices, monthly sales report, etc
  • End user sould be able to modify header, footer or columns in tables

Not interested in fancy-charts and analytics, just basic features of tabular reports with header and footer




Authorization header issue with safari

Safari is not sending authorization to the server on the production server. This works perfectly on Firefox, chrome and opera.

      fetch(url, {
     "Content-type": "application/json",
     Authorization: "Bearer sample_token"

    }).then(res => console.log(res))
    .catch(err => console.log(err));




How to pass arguments from tornado to a jsp file?

I have shared a part of my code and in the Class 'Room',variable 'nw' has the query string value.Now,I want the .jsp file to autofill the 'nw' field with the query string value dynamically.How do I get that?Does self.get_namespaces help?

    class Room(tornado.web.RequestHandler):
    def get(self):
       nw=self.get_argument("nw")
       print(nw)
       self.render("RoomPost.jsp")  

class static(tornado.web.RequestHandler):
    def get(self,key):
           iname="static/" +key
    print iname
              self.render(iname)        
settings = {
    'debug': True,
    'static_path': 'static'}

application = tornado.web.Application([

        (r"/room",Room ),

        #(r"/static/(.*)",static)
        ], **settings)
if __name__ == "__main__":
    application.listen(5500)
tornado.ioloop.IOLoop.instance().start()

Following is the .jsp file

<html>
<head>
<link rel="stylesheet" href=" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

</head>
<body>
<c:import url="InnerHeader.jsp"></c:import>
<br><br><br>

<center>
    <form action="/room" method="post" >
    <fieldset>
        <legend>
            <b1>Room Add</b1>
        </legend>
        <table class="registerTable">
            <tr>
                <td>Name of NW/Name of Home</td>
                <td><input type="text" name="nw" placeholder="Kfx-Home"
                    maxlength="15" size="30" autofocus required/></td>
            </tr>

                <tr>
                <td colspan="2" align="center" > &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
                <input type="submit"     value="  Submit  " /></td>
                </tr>

        </table>
        </fieldset>
    </form>
</center>




Complex excel spreadsheet in web app

  • I am looking to use an excel spreadsheet in a web app
  • The spreadsheet outputs another spreadsheet based on user input
  • I am wondering whether it is better to translate the excel formulae into python code or whether it is better to actually integrate the spreadsheet with the excel formulae?



Cookies accross sub-domains

I have two subdomains foo.example.com and bar.example.com, I am setting javascript cookies on the foo.example.com, but not able access it on bar.example.com, please suggest a way to access the cookie created on the foo.example.com on bar.example.com




tizen BLE scanner webapplication

im trying to develope a tizen application with BLE scanner and in device.manufacturerData.data is returning "䱄~ " and JSON.stringify(device.manufacturerData.data) is returning "䱄~\u0003"

in the API documentation, it says that manufacturerData.data is a DOMstring, how can i covert it into something readable ?




Anyone know how this text editing is made? (swiftscribe.ai)

I am planning to develop some frontend interface similar to this example.

http://ift.tt/2BfJDGA

I found out that each text is displayed as elements so they are clickable to trigger actions, also the are with some data binded as attributes, secondly it allows people to directly edit the text, while i am editing the text, it really is deleting and adding elements, may I know how is it done please?

I inspected the website a bit and found out they use knockout.js which i guess is for data binding, I am very curious of how the whole text editing works that it allow user to add and delete the elements just by typing normally. Thanks!




How to debug a php file hosted in a server

Hey I want to know how can I debug a php file from my computer, i have access to the server througth SSH so I want to debug the file using the command line




Angular5: Return HttpClient response from a service to a Component?

I currently learning Angular 5 and I'm having difficulty on passing data from a service to a component. I'm integrating this to wordpress..

here's my current code:
orderers.component.ts

import { Component, OnInit } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

@Component({
    selector: 'app-orderer',
    templateUrl: './orderer.component.html',
    styleUrls: ['./orderer.component.css'] })


export class OrdererComponent implements OnInit {

o_manual:boolean = false;
orderers = [];

constructor(private http:HttpClient) { }

ngOnInit() {
    this.get_users();
}

get_users() {
    this.http.get('http://ift.tt/2A7ZARM').subscribe( data => { 
        this.orderers = data;
    }
} }

how can i transfer get_user() to a service and return the data and pass it in the component ? Thanks .. :)




Adding table with flask

In my basic web application, when click to "calculate" button there can be two options. First, there is only one result so I directly show them to the users. Secondly, there can be more than one result so I need to use table to show my results.

For the first option, I can show my result like below:

<p>Result </p> 

But I cannot figure out if my "result" parameter is array and how can I show it in the table in my html file.

Any help is appreciated.




IONIC 3 - Razorpay - can we use the same cordova plugin for web app

I have integrated Razorpay in my IONIC 3 application using the cordova plugin at http://ift.tt/2BfjUy2.

I am using my IONIC 3 app as a web applicaiton also. Its working perfectly fine on mobiles.

What should I do to make it work in web ? Could any one please help me ?




404 not found error after converting project from jade to pug node js

I had a project which requires logging in as admin and then the page redirects to the admin panel. Now, my project was working fine in Jade template but after upgrading to pug and renaming all views I am getting this problem:

Error: Not Found at /Users/uzayrhussain/Desktop/OOES2/app.js:53:13

This is login.pug

doctype html
html(lang='en')
  head


  body
    // Top content
    .top-content
      .inner-bg
        .container
          .row
            .col-sm-8.col-sm-offset-2.text
              h1
                strong Login
          .row
            .col-sm-3
              a.btn.btn-info(href='/', role='button') Go Back!
            .col-sm-6.form-box
              .form-top
                .form-top-left
                  h3 Fill the form to sign in:
              .form-bottom
                form.login-form(role='formlogin', action='login/#{method}', method='post')
                  .form-group
                    label.sr-only(for='form-username') Username
                    input#form-username.form-username.form-control(type='text', name='username', placeholder="username")
                  .form-group
                    label.sr-only(for='form-password') Password
                    input#form-password.form-password.form-control(type='password', name='password', placeholder="password")
                  button.btn(type='submit') Login
            .col-sm-3

    // Javascript

    //if lt IE 10

App.js

var app = express();

require('./config/passport')(passport);

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
app.use(logger('dev'));
app.use(cookieParser());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));

app.use(session({secret: 'my_app_secret'}));
app.use(passport.initialize());
app.use(passport.session());
app.use(flash());



var monk = require('monk');
var db = monk('localhost:27017/examdb');

var admin = require('./controllers/admin');
var login = require('./controllers/login_controller');
var index = require('./controllers/index');

app.use('/',index);
app.use('/login', login);
app.use('/admin', admin);

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
//app.use(cookieParser());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));


// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});


// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: err
    });
  });
}


// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
  res.status(err.status || 500);
  res.render('error', {
    message: err.message,
    error: {}
  });
});


module.exports = app;




dimanche 26 novembre 2017

Google Chrome Text to Speech in Hindi

Am Developing a Application which speak user query results. i mean server return a text and user can listen that text too.

SO i used Chrome SpeechSynthesisUtterance utility. now the need come how speak that text in hindi. again i google and found some stuff. and now this utilty speaking only one figure in hindi. rest in English. text that am using is "your average value is, Net Revenue 20424987 ,values which are above average. shoes Net Revenue 102096080, clothing Net Revenue 49499808, and values which are below average, sports and fitness Net Revenue 4497, jewellery Net Revenue 61391, toys and games Net Revenue 427047,"

Please check below code and tell me how i can only make my code to speak numeric values in hindi

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://ift.tt/2apRjw3">
  <script src="http://ift.tt/2nYZfvi"></script>
  <script src="http://ift.tt/2aHTozy"></script>
<script>
var CHARACTER_LIMIT = 50;
var lang = "hi-IN";

var text = "your average value is, Net Revenue 20424987 ,values which are above average.  shoes Net Revenue 102096080, clothing Net Revenue 49499808, and values which are below average, sports and fitness Net Revenue 4497,  jewellery Net Revenue 61391,  toys and games Net Revenue 427047,";

speak(text, lang)

function speak(text, lang) {

  //Support for multipart text (there is a limit on characters)
  var multipartText = [];

  if (text.length > CHARACTER_LIMIT) {

    var tmptxt = text;

    while (tmptxt.length > CHARACTER_LIMIT) {

      //Split by common phrase delimiters
      var p = tmptxt.search(/[:!?;]+/);
      var part = '';

      //Coludn't split by priority characters, try commas
      if (p == -1 || p >= CHARACTER_LIMIT) {
        p = tmptxt.search(/[,]+/);
      }

      //Couldn't split by normal characters, then we use spaces
      if (p == -1 || p >= CHARACTER_LIMIT) {

        var words = tmptxt.split(' ');

        for (var i = 0; i < words.length; i++) {

          if (part.length + words[i].length + 1 > CHARACTER_LIMIT)
            break;

          part += (i != 0 ? ' ' : '') + words[i];

        }

      } else {

        part = tmptxt.substr(0, p + 1);

      }

      tmptxt = tmptxt.substr(part.length, tmptxt.length - part.length);

      multipartText.push(part);
      //console.log(part.length + " - " + part);

    }

    //Add the remaining text
    if (tmptxt.length > 0) {
      multipartText.push(tmptxt);
    }

  } else {

    //Small text
    multipartText.push(text);
  }


  //Play multipart text
  for (var i = 0; i < multipartText.length; i++) {

    //Use SpeechSynthesis
    //console.log(multipartText[i]);

    //Create msg object
    var msg = new SpeechSynthesisUtterance();
    //msg.voice = profile.systemvoice;
    //msg.voiceURI = profile.systemvoice.voiceURI;
    msg.volume = 1; // 0 to 1
    msg.rate = 1; // 0.1 to 10
    // msg.rate = usersetting || 1; // 0.1 to 10
    msg.pitch = 1; //0 to 2*/
    msg.text = multipartText[i];
    msg.speak = multipartText;
    msg.lang = lang;
    msg.onend = self.OnFinishedPlaying;
    msg.onerror = function (e) {
      console.log('Error');
      console.log(e);
    };
    /*GC*/
    msg.onstart = function (e) {
      var curenttxt = e.currentTarget.text;
      console.log(curenttxt);
      //highlight(e.currentTarget.text);
      //$('#showtxt').text(curenttxt);
      //console.log(e);
    };
    //console.log(msg);
    speechSynthesis.speak(msg);

  }

}
</script>
</head>
<body>

<div class="container">
  <h2>Animated Progress Bar</h2>
  <p>The .active class animates the progress bar:</p> 
  <div class="progress">
    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width:10%">
      10%
    </div>
  </div>
</div>



Express validator iteration to body check every item in the array has the correct input

Good night. I have to validate if every element in the array has a username. I'am currently using express-validator successfuly to validate only one user, but I dont know how to deal with the array.

I want to do somethink like

  req.checkBody('username', 'username is required').isEmail();

But for each element in the array. In which case the following input sends an error for the first argument in the array given that it has no username. I was thinking something like

  req.checkBody('req.body[1].username', 'username is required').isEmail();

whould work but it dosn't.

[{
  "password": "123",
  "nombre":"kila",

},
{
  "username": "vanilla@skalia.com",
  "password": "123",
}]




Is there any free wordpress plugin to showcase client's logo carousel in grayscale effect ?

I want to create one logo carousel to showcase our client companies, I have seen somewhere logos in gray color at the start and once the user hovers on it, it turns to its original logo color?. Anybody, please tell me how can I achieve this effect for WordPress site? with any plugin or external code?

This kind of effect




glowing object tin three.js

I am trying to create a textGeometry in three.js and for some reason it just isn't showing. Also i have looked at other three.js text examples and they just don't show after i use the same method. My code is below thanks.`

var loader = new THREE.FontLoader();

loader.load( 'fonts/helvetiker_bold.typeface.json', function ( font ) {

var textGeo = new THREE.TextGeometry( "My Text", {

    font: font,

    size: 50,
    height: 50,
    curveSegments: 12,

    bevelThickness: 2,
    bevelSize: 5,
    bevelEnabled: true

} );

textGeo.computerBoundingBox();

var centerOffset = -0.5 *(textGeo.boundingBox.max.x - textGeo.boundingBox.min.x)
var textMaterial = new THREE.MeshPhongMaterial( { color: 0xff0000 } );

var mesh = new THREE.Mesh( textGeo, textMaterial );
mesh.position.set( centerOffset, 400, 0 );

var group = new THREE.Group();
group.add(mesh);

scene.add( group );

Please any idea would help. Thanks:).`




Load balancer and 2 vhosts nginx

Hello server enthousiasts!

I'm running multiple hardware servers, and now I'm installing an Nginx reverse proxy server! The Nginx server has 2 network interfaces (192.168.1.220 & 192.168.1.219). But I have a problem, I have multiple virtual hosts:

1.

listen 192.168.1.220:80;
server_name domain.com;
etc...

2.

listen 192.168.1.220:80;
server_name my.domain.com;
etc...

These are working fine but when I add the third one, the first two don't work anymore... The third one is a balancer specified in the nginx.conf.

3.

listen 192.168.1.219:2000;
server_name _;
etc...

The goal is just to get them all three working together. Thanks for your response!




what products implement EJBLite?

I was wondering what specific products implement EJBLite? I could not find in documentation any reference to this.

Thanks




Continuously pulling variables off a website to use on Matlab?

I am trying to continuously pull variables off this website (or a similar website)

http://ift.tt/2n4gAnb

and use the variables in a Matlab code for some calculations. The variables i need are in the picture below.

I realize i could download a .txt from another site with the info but I need to update the variables every 10 secs or so, so that's not going to work.GM stocks

I would really appreciate any help in terms of where I can find resources to do this or something that will get me started. thank you!




Ext JS SORTING (2, 5, 30, 100) compare function

Using ExtJS 4.2.3. I have list of values which sorts as string and it looks like:

   DATA1 (NOW)  | DATA1 (SHOULD BE) |  
  -----------------------------------
       100      |         2         |  
       2        |         5         | 
       30       |         30        | 
       5        |         100       |

Exanple of code on ExtJS:

 DATA1_store = new Ext.data.TreeStore({
                model: DATA1.id,
                proxy: {
                    url: proxyCfg.url,
                    type: proxyCfg.type,
                    reader: {
                        type: "json",
                        root: "data"
                    }
                },
                remoteSort: true,
                sorters: [{
                    property: "data1",
                    direction: "ASC"
                }],

Here should work compare function like on javascript:

points.sort(function(a, b){return a - b})

Asking for help with compare function or mb another way for code part above of ext JS.




How to create admin for each group in Django Admin?

I want to to make an (special,custom) admin for each group in Django Admin. The superadmin can manage all of users and groups and the admin of one group can manage only users who are in this group. How can I make it?

Thanks!




paid for webhosting but have not received server address or webhosting guide

I've coded and finished building my website. I don't know if I'm missing something but I recently paid for webhosting online, but only receieved an emailed invoice, no server address, no password, or username. No webhosting guide at all. Have I been bamboozled, or is there a step I'm missing?

This is probably extremely trivial but please help clarify the webhosting process for me, immediately post-payment.

Thank you




Adding .htpasswd to my web site

Hi.I'm new at web, and I want to create a site. I've ordered a domain name and hosting, so now I have access to storage on hosting. What have I to do to protect any folder using htpasswd?

All that I have in http folder is index.html and folder examle, that contains .htaccess and .htpasswd and example2 folder, that should be protected.

When I try to access example2 folder from browser, I get popup window, that asking me for a login and password, and when I enter it I have a 500 internal sever error




is my iOS application is a Web Application?

I'm developing an iOS application that communicates with my server.

enter image description here Above picture shows how my iOS works.

I want to know whether my iOS application is an Web Application or not and what is Web Application exactly.

I read below web site. http://ift.tt/2i7njuW

However the definition of Web Application is too ambiguous to me. It seems that usually web browsers are needed for Web Application to perform tasks. However my iOS application doesn't need web browsers(chrome, safari etc..) to perform tasks and my iOS application is essential to perform tasks.

I have some questions.

1.In this case, is my iOS application(including php Server and db) a Web Application? 2.Or.. is my php Server including db a Web Application? 3.Is my iOS application a web browser?(My application is quite different from web browsers such as Chrome and Safari. It only communicates with my php server and it doesn't show web page. My app just ueses json http response from server to perform tasks)

Thank you in advance :-)




samedi 25 novembre 2017

Javascript, delete user account in firebase

I want to know how can I delete user's account without sign in.. I have a page where admin need to delete users.. so the users will not be sign in to tack their "uid" and delete the account.. I want to delete them using their uid




How to Pass where Condition through Getasync to execute & get the Result in rest API c#

I need to pass the where Condition from xamarin forms (C#) HttpClient for my SQL query which is running on asp.net Web API. Like

select * from salesdetails where locationcode = 4 and entrydate between '1/jul/2017' and '31/jul/2017'

I need to pass the where Condition from using c# HttpClient in xamarin forms. How to do this ??




Python web communication between files

I have my game created in pygame and now i want to create some sort of multiplayer, where one player will be hosting and the other will join the room. At the moment i have no idea about internet connection between two programs on different PCs and haven't found anything on google either. Thanks for any clues




application web Security using glassfish

I developped a web site (html and js) , and I want to deploy it in glassfih, I didn't use any authentification page but I want to protect my website access what's the best way for application web Security using glassfish : BASIC, FORM or DIGEST ? any other suggestions . thank you




Error validating DNI in Java Web

I created a Java Web application connected to a GlassFish server and i have an error that i can't resolve. My app is that if a dni (nif) is valid or not. First I put a formulary thatsends the dni to the validator and determines if it is valid. OK, all seems good but when I run the file, pass this:

The error

I think that the problem is the import but i'm not safe...help please. thanks

<%@page import="java.util.regex.Matcher"%>
<%@page import="java.util.regex.Pattern"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
   <head>
      <title>Validate dni</title>
   </head>
   
   <body>
       <form action = "DNIvalid.jsp" method = "GET">
         Input your DNI: <input type = "text" name ="dni">
         <input type = "submit" value = "Submit" />      
      </form>
 <% Pattern pattern=Pattern.compile("(\\d{1,8})([TRWAGMYFPDXBNJZSQVHLCKEtrwagmyfpdxbnjzsqvhlcke])");

        Matcher matcher=pattern.matcher(request.getParameter("dni"));

        if(matcher.matches()){

            String letra=matcher.group(2);

            String letras="TRWAGMYFPDXBNJZSQVHLCKE";

            int index=Integer.parseInt(matcher.group(1));

            index=index%23;

            String reference=letras.substring(index,index+1);

            if(reference.equalsIgnoreCase(letra)){

            
                out.println("Is valid");

            }else{

             
                out.println("Is invalid");
            }

        }else{

      
            out.println("Is invalid");
        } %>
   



What HTTP error should I return if client sends incorrect type of data to REST API?

Say I have a page that requests the user to send ID, and ID should be an Integer. If the user send an alphanumerical (or anything that doesn't fit Integer format), should I return 400 - Bad Request or 406 - Not Acceptable?