Web Development





Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have 11 servers... all running nginx + php7 and one load balancer (nginx as well)... how do I keep the code synced across all servers... I dont want to go in and save in each and every server the same code, what approach would be the "standard" for this?

loadbalancer.server.com -> app1.server.com/app2.server.com/app3.server.com/app4.server.com, etc...
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

While learning about converting numbers to hexadecimal, I found a video that seems to explain it good. I understand most of it. But could someone explain why a number like one (1) divided by 16 produces 0 with a remainder of 1?
5815 / 16 = 363 R 7
 363 / 16 = 22  R 11 (B)
  22 / 16 = 1   R 6
   1 / 16 = 0   R 1
Result = 16B7

Open in new window

I am working on a project using aspdotnetstorefront 9.4. It has been a number of years since I have used the product and in the past it was mostly fronted development. What I need help with is that currently there is a login menu link and it should take you to a signin page. What we are currently trying to implement is using bootstrap 4, upon clicking the login menu link in a hidden div or dialog box there would be a login form that would allow you to sign-in to the site. I have already been able to implement the form with bootstrap on the visual side, but I am not sure how to code the form so that when you login the form actually works and logs you in.

Any help or code is most appreciated!
I have installed AWstats install on CentOS7, by following this guide https://panel.bullten.net/knowledgebase/59/Install-and-Configure-Awstats-in-CWP.html
When I visit http://mydomain.com/awstats/awstats.pl?config=mydomain.com all I get is a page of text as below,
# Free realtime web server logfile analyzer to show advanced web statistics.
# Works from command line or as a CGI. You must use this script as often as
# necessary from your scheduler to update your statistics and from command
# line or a browser to read report results.
# See AWStats documentation (in docs/ directory) for all setup instructions.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
require 5.007;

#use warnings;		# Must be used in test mode only. This reduce a little process speed
#use diagnostics;	# Must

Open in new window


We have an external dev team (agency) working on one of our internal tools that we use in house.

The database and data files (application images) reside in AWS.

We are currently rebuilding the entire application / tool in house. The external dev team (agency) have given us access to the database so that we can extract the data from the database when we need it, however they are struggling to come up with a way that they can grant us access to the data files (our client profile images, etc...). They said they have other tools and clients under their AWS account, so they cannot give us access to their AWS account.

We have over 50 clients using our tool everyday so we need constant access to the database and data files, right up to our transitional switch over to our new platform.

Can anyone recommend a convenient way that we can access the data files on a continuous basis?

Thank you in advance for your help.
I am creating postage labels and recording them into a pdf file using FPDF and PDF_Label - all work fine, see code sample below ...
$text = sprintf("%s\n%s\n%s\n%s %s %s\n%s", "   6         022, "Name","Address", "Location", "State", "PostCode", "Country");

As you can see, I am using sprintf to format text for the label and using Add_Label from PDF_Label class to create the label.

I would like to BOLD the "Name" portion within the sprintf, if possible. As far as I can tell this can't be done. Tried using html tags inside it - no good, just prints the tags.

Any help or suggestions appreciated.
I am developing a reusable javascript component that can potentially be on a page multiple times. The problem I am having is binding a specific instance of this component to an instance of the object that stores it's configuration and functionality. I'm looking for a pattern that will let me do this.

Assuming I have a generic container on a webpage for content:
<div id="SharedContainer"><div>

Open in new window

I want to generate 2 instances of a component so I might have something like this to create 2 instances by telling makeNewComponentInstance in which element to place these new instances and the second parameter passes something unique to that instance:
makeNewComponentInstance( document.getElementById("SharedContainer"), {"instanceCode":12345} );
makeNewComponentInstance( document.getElementById("SharedContainer"), {"instanceCode":67890} );

Open in new window

So I wind up with something like:
<div id="SharedContainer">
  <div>My component1 
     <button onclick="alertMyInstanceCode();">Write To Log</button>
  <div>My component2
     <button onclick="alertMyInstanceCode();">Write To Log</button>

Open in new window

For some reason I can't remember the right pattern to initialize instances on the fly while allowing to bind the configuration to only that instance it was created for. I don't want to try storing as an html object because the state and configuration information for a specific object is much more complex than the example I am giving.

I've done this before when I had control of how many instances I needed so I would just create however many instances of a variable I need to store it.
var myComponent1 = new ComponentInstance( document.getElementById("SharedContainer"), {"instanceCode":12345} );
var myComponent2 = new ComponentInstance( document.getElementById("SharedContainer"), {"instanceCode":67890} );

Open in new window

Hi Dev Experts,

I have this problem on my application on how to create multiple canvasses. There is no problem with this but on the Fabric.js API that I used.

In my case I created a div which will be filled with images as representation for my canvasses on button click.  I also created five canvasses which visibility are hidden and  will be shown when the user click  the list of image canvas.

My problem is that how can i create or assign a new  variable to fabric.js like this if you can create only one variable for all your objects ?
var canvas = new fabric.Canvas('mycanvas');//mycanvas is an id of one canvas but must come from five canvasses

Open in new window

Thank you in advance for you help and time !!!
I am using following code  ( but not clear how to pass a parameter when a user click on firebase notification? )

public override void OnMessageReceived(RemoteMessage message)
            string click_action = message.GetNotification().ClickAction;
            SendNotificatios(message.GetNotification().Body, message.GetNotification().Title, click_action);
        public void SendNotificatios(string body, string Header, string click_action)
            Notification.Builder builder = new Notification.Builder(this);
            //Intent intent = new Intent(this, typeof(MainActivity));
            Intent intent = new Intent(click_action);
            intent.PutExtra("click", click_action);
            PendingIntent pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.OneShot);
            builder.SetLargeIcon(BitmapFactory.DecodeResource(Resources, Resource.Drawable.AppLauncher));
            NotificationManager notificationManager = (NotificationManager)GetSystemService(NotificationService);

Open in new window

i'm trying to reload user privileges dynamically.

i'm trying to achieve custom authorization mechanism via MethodSecurityExpressionOperations or GrantedAuthority to secure the URL and authorize the URL based on the conditions.

i come across two flavours of Spring to handle this one is via MethodSecurityExpressionOperations and the other is via GrantedAuthority - createAuthorityList

i am not sure which one is better and which one to be used in the case of dynamic reloading of user privileges where one user privilege has been updated by another user dynamically while the user is working on...

Get 10% Off Your First Squarespace Website
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Difference between Servlet Filter vs Spring Security Filter ?

Some says security filter just authenticates the user, where as servlet filter authorizes the request

Need code snippet to understand the structure of both and the differences.
Hi expertsAWS opened ports for reference,

   My web application is running on aws ubuntu 16.  I have the following ports open from aws.  
It has the following applications running on ubuntu

uwsgi with nginx -  i  Think it uses port 80
node.js with react - react is rendering on port 9009
webpack with webpack.config.js - which creates js file which will be using port 80
npm run django: runserver  uses port 8000
elastic search :9200 uses port 9200
postgresql used port:5432

Please see the opened ports on aws.  screenshot for reference.

With putty I connect to linux ubuntu machine with the following ip address

There is docker application which runs inside that linux box uses nginx, postgres, elasticsearch

When I run docker application, and I able to see from browser with

Where as when I run python manage.py runserver I am not able to see the application.

The site can't be reached refused to connect error.

Whereas I can see the docker application when the docker is run.

Please help me why the python application is not running on the browser, where as Docker application runs well.

With python manage.py runserver 0,0,0,0:8000 I am running from the source code.  Whereas with docker I am running the docker image.

Both are same application.  

Please help me in fixing this issue.

with many thanks,
Bharath AK

I am looking at creating a webform page that contains an iframe. The iframe content is from another web domain that will contain a combination of images, JavaScript and html.

My question is how to ensure this will work with CORS and also ensure this is safe.

Any help is appreciated.
Spring Boot Version: 2.0
Spring Version: 5.0.4

Facing the following issues on trying to implement AccessDecisionManager

1. When used

public class WebConfig implements WebMvcConfigurer

Issue:  uanble to override protected void configure(HttpSecurity http) throws Exception {

2. When used

public class WebConfig extends WebSecurityConfigurerAdapter {

Issue: unable to override the following

a. public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
b. public void addResourceHandlers(ResourceHandlerRegistry registry) {
c. public void addInterceptors(InterceptorRegistry registry) {

3. Throws error "java.lang.IllegalStateException: No ServletContext set" when used as below

public class WebConfig extends WebSecurityConfigurerAdapter implements WebMvcConfigurer {

URL for reference:  http://www.baeldung.com/spring-security-custom-voter

public AccessDecisionManager accessDecisionManager() {
    List<AccessDecisionVoter<? extends Object>> decisionVoters
      = Arrays.asList(
        new WebExpressionVoter(),
        new RoleVoter(),
        new AuthenticatedVoter(),
        new MinuteBasedVoter());
    return new UnanimousBased(decisionVoters);

protected void configure(HttpSecurity http) throws Exception {
Hi Experts,

How can I put a simple banner as illustrated below on all pages of my site?

In this example, the banner has the text "LearnDash v2.5.6 Now Available" and a "Read More" button.

Example of simple banner to appear on all pages of my site
This is a follow up question of

The typical example only shows the date range with no icons:
My current requirements are:
 - Responsive (must work Real Ipad and mobile galaxy)
 - When day is selected the date picker must close.
 - When picker is shown, it must open down the picker location.
 - Date range must work with icons and have similar behaviour as per current sample link.
 - It supports IE11 onwards, Chrome (latest and previous 3 releases) and Safari.
 - It supports Iphone 7 and up and Galaxy S5 and up.

 We are currently using Bootstrap latest 3.x version and Jquery 1.12.x
I come across the following link


Custom Filter OR Servlet Filter or AccessDecisionVoter

Need to provide access to user after login to the pages or actions based on certain conditions (user is active or user expiration date is over or user doesn't have any orders) and looking for a custom spring security. In the above which one would be suitable in this case and need a good code snippet to achieve it.
Hey, guys.

I have a side project I'm messing around with.  I'm making a web site and I would like for it to have some interactive images, but I don't know where to start.

One Page:
- On the web page is a grid.
- Within each box of the grid, there is a basic symbol, such as a circle
- When one hovers over the circle, a preview appears of an image or video specific to that circle
- When one clicks on the circle or on the preview, the image or video opens in a new window, new tab or some other way which doesn't obscure the grid
- A user can change the symbol from a circle to an X (or something else)

Another Page:
- On the web page is an image, such as a map
- On that image are buttons
- When a user clicks on a button, icons specific to that button appear on the map.
- When the users clicks again, the icons disappear
- There can be multiple types of icons on the map

For the latter page, I'm thinking of a basic image with layers and the buttons simply make the layers visible or invisible.

Regardless, I don't have a clue where to begin.  Do I use something like Adobe Animate? Is there some other tool out there which can create this type of interactive content on a website?

So far, waving my VooDoo stick at the screen and chanting hasn't helped.

I am trying to include some text blocks on a SharePoint 2013 Survey.  It would seem that there would be some functionality that allows for this, but there is not.  Is there a way around this?  I need to include some titles and directions at the beginning of the survey, and some informational text throughout the survey.
Easily Design & Build Your Next Website
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

I am working on my website on PHP, and at some point, it is required to have a membership. I added the "Login with Facebook" but it is not working with me fully. When the user clicks on Login with facebook, it takes him/her to facebook and it returns him/her back to my website with a very big code that I do not know what to do with it.

The return URL is :

My login page is as per below:


I already uploaded the files from GetHub "php-graph-sdk-5.x.zip"
Facebook files

- What should i write inside the login.php to get the user details ? I need the email at least.
- How to understand the return URL?
1. Difference between spring authorization and spring security ?
2. Need few samples or code snippets to understand spring authorization.
3. Assume need to authorize every user action and not sure how to do it?
Good UX design is based on brief on words as illustrated by most web sites.
But  Google now requires Content rich sites and the SEO concensus is that there should be a minimum 400 relevant words
and preferably 1,000 to 2000 relevant words per page for rankking benefits.

I find these UX and SEO planks difficult to reconcile.

Can anyone help please?
Hi all, I know this is all over every forum and I have tried and tried but just can't get it to work.
It is for a free image hosting service that allows hotlinkning, but not abusive hotinking, so they need to stop images being hotlinked from certain outside domains only, all other websites/forums etc can hotlink, in the same way imgur block hotlinking to sites that break their terms of service.

The .htaccess file looks like this but images are still hotlinked to eBay, any ideas?

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^https://(.+\.)?vipr.ebaydesc\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://(.+\.)?vi.vipr.ebaydesc\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://(.+\.)?ebay\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://(.+\.)?ebaydesc\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://(.+\.)?www.ebay\.com/ [NC]
RewriteRule .*\.(jpeg|jpg|gif|bmp|png)$ https://mydomain.com/nohotlinking.gif [L]

RewriteEngine on
RewriteRule \.(gif|jpe?g|png|bmp) 404.gif [NC,L]

Open in new window

The second rule is designed to show an image when the image at a particular url has been deleted, that works perfectly.

We have also tried variations such as,

RewriteCond %{HTTP_REFERER} ^http(s)?://(.+\.)?vi.vipr.ebaydesc(.+)?\.com [NC]

Open in new window


RewriteCond %{HTTP_REFERER} ^https://(.*\.)*ebay\.com [NC,OR]

Open in new window

But nothing works, now we know its possible as imgur do it.

Any ideas?

I'm attempting to create a dataset where an email list is enriched with the person's metadata such as department, manager, state, etc.  Data set A has a field of email addresses.  Data set B also has  field of email addresses along with multiple rows of metadata for the person.  As illustrated in the attached image, there may be missing values in some records, but not missing in other records.  Supposing that the attached data set is for a John Smith, how can I produce a final report where John Smith has values for each metadata field.  I need to do this in Python and the metadata should come from the latest data record first and then iterate over the other other records if values are missing.  Another point to make is that the metadata field names may change, so it's better that we refer to them by their index value.
What is the correct syntax to cause the 2nd animation to start after the first one finishes:

@keyframes toColor {
    0%    { -webkit-filter: grayscale(100%); filter: grayscale(100%); }
    25%   { -webkit-filter: grayscale(75%); filter: grayscale(75%); }
    50%   { -webkit-filter: grayscale(50%); filter: grayscale(50%); }
    75%   { -webkit-filter: grayscale(25%); filter: grayscale(25%); }
    100%  { -webkit-filter: grayscale(0%); filter: grayscale(0%); }

@-webkit-keyframes myMove {
    0%   { -webkit-transform: scale(1); }
/*    50%  { -webkit-transform: translate3d(0, 0, 0);} */
/*    100% { -webkit-transform: scale(.5), translate3d(-450px, -350px, 0);} */
    100% { -webkit-transform: scale(.5);}

.MyClass #t3-content img {
    margin: auto;
    width: 50%;
    height: auto;
    animation: toColor 4s;
    animation: MyMove 2s;  /*this one overules the first animation*/
/* either one of the above animations will work on their own but not sequenced as above */

Web Development





Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.