#BlackFridayMonth: 50% Off WPMU DEV Agency + $360 Free Hosting… FOREVER!

Why wait until the end of the month for Black Friday when you can get amongst our biggest (and only!) sale of the year… RIGHT NOW.

Everyone loves a good Black Friday sale. But NO ONE likes waiting til the end of November for it to finally start.

Which is why, this year, we’ve decided to make Black Friday…

ALL OF NOVEMBER.

Yep, from November 1st, all the way through to the 30th, you can get our biggest sale of the year (well, our only sale of the year!) any time you choose.

We won’t beat around the bush, here’s the deal:

50% OFF Agency ($990 $495/y) + $360 Free Hosting… FOREVER!

That’s our biggest and best plan… All the bells and whistles… Half price… For life!

Plus, your last chance EVER to get the $360 free hosting add-on available with the Agency plan (more on this below).

You get:

  • The Hub site manager (for unlimited sites)
  • Dedicated WP hosting ($360/y value) — last month ever to get this!
  • Fee free client billing (automate all your subscriptions & billing)
  • Professional client portal (your own cPanel for clients)
  • 11 pro WP plugins ($3190/y Value)
  • 250GB Smush CDN ($240/y Value)
  • Unlimited seats (invite colleagues & clients)
  • 24/7 expert live support (for everything WP & beyond)

Over $3,790 value, all for just $990/y $495/y!

(Which, if you take the $360 hosting off is actually $135/y, for the best WPMU DEV plan available)

But here’s what really makes this deal special:

1. It’s for a lifetime

You’ll get to keep this price forever, no matter how many amazing new features and tools we add in future.

2.It’s your last chance to score the $360 free hosting add-on before we remove it from the Agency plan forever

Due to some new and exciting changes to our hosting infrastructure, after this sale we are *taking away* the $360/year hosting credit (enough to host 3 Bronze sites for a year) on this plan for all new members.

Making this month your last chance to get $360 of the best-rated (by Trustpilot no less) WP hosting on the web… forever.

3. It’s completely free to try before you buy.

We know switching or upgrading to a different platform / set of tools isn’t a decision made lightly… no matter how good the deal is.

Good thing you can take our Agency plan for a 7-day no-risk free trial, before you even consider going ahead with the half-price membership.

Not satisfied with the plan during your trial? Cancel, and it’ll be like nothing happened.

On the other hand, if the Agency plan is all you could ask for, and more (which we’re confident it will be), then your 50% off for life will be applied immediately following your trial.

BONUS BF GIVEAWAY: Enter our Black Friday Month caption contests to score this year’s entire BF offer free for your first year!

Remember these dates:

  • Tuesday the 2nd of November
  • Monday the 15th of November
  • Monday the 29th of November

Because this is when we’ll be running our Black Friday-themed comic caption contests (each lasts for a week), where three lucky people will win our entire Black Friday offer (50% off Agency plan + $360 free hosting) FREE for their first year.

If you weren’t aware, we recently released our own WP comics collection and we’ve been running bi-weekly caption contests where, so far, we’ve given away over $200 worth of free hosting.

Subscribe to the The DEV’s Pixels to be first to know about our BF caption contests, and future contests. We’ll also let you know when the contests are running on social.

Only 1000 deals available until the end of November, or when they run out

Obviously we have to put a limit on all this craziness – starting at 1,000 deals (we cannot confirm or deny that we may have extra reserved if we run out of this first batch ;)).

Because if it got picked up overnight and we sold 20k of these then, well, nobody would be able to sleep for the next 3 months as we doubled the team.

But don’t worry, everyone will have plenty of chances to grab a deal and win some amazing prizes over the course of the month.

One final recap…

  • After this month, our Agency plan (the biggest and best plan, all the bells and whistles) will go back to costing $990/yr ($82.50/m).
  • But if you act now, you can lock it in for just $495/yr ($41.25/m), FOR LIFE. You won’t ever have to pay a cent more as long as you’re with us.
  • After this month, the free hosting included with the Agency plan will also drop steeply by 3 times, from $360, down to $120.
  • Meaning from next month on you’ll have to pay $240 extra to get the same level of hosting (up to 3 Bronze hosted sites free for a year).
  • You can take our Agency plan for a no-risk, 7-day free trial first. Your discount will automatically be applied at the end of your trial if you choose to proceed.

So don’t miss out on securing our Agency plan at a ridiculously low lifetime price AND scoring the most free hosting $$ we’ll ever offer.

Get 50% OFF Agency ($990 $495/y) + $360 Free Hosting… FOREVER!

Black Friday Month Q&A

A lot of you will no doubt have questions about this month-long sale, so here’s a few we prepared earlier:

(We’ll add to this if more questions come in throughout the month)

Q: Is this a genuine lifetime deal?

A: Yes it is, we have grandfathered members from a decade ago on their old prices (don’t believe us, ask in the forums) and we’ll do the same for you.

Eventually this plan is going to be $3-5k a year and you’ll have it for $495 (including $360 worth of hosting!), which will feel pretty sweet :)

Q: Is this really the last chance to score $360 free hosting?

A: It really is! Because of some upcoming (and incredibly exciting!) changes to WPMU DEV Hosting, we’ve made the decision to lower the amount of free hosting included with the Agency plan by 3X — from $360, down to $120.

So from next month you’ll have to pay $240 extra to get the same level of hosting (up to 3 Bronze hosted sites free for a year). Grab it while you can.

Q: How can you afford this? / It seems too good to be true!

A: We’ll try and answer it (without going into boring economics), but there are two ways:

Firstly, our hosting costs us less to provision the more of you there are using it (so economy of scale) but also we have found that anybody who tries our hosting loves it so much they generally use it for all of their new sites… So that’s how!

Q: Can I pay this monthly?

A: Sadly not, this is an annual only offer (the money up front also helps us keep it this low).

Q: When the deals run out will you release some more?

A: It always pays to have a backup plan ;), but we’ll cross that bridge when it happens and let you know, stay tuned.

Get 50% OFF Agency ($990 $495/y) + $360 Free Hosting… FOREVER!

my output does not want to reverse

can somone tell me why my output does not want to reverse and the solution to it

#include <stdio.h>
#include <string.h>

#define QUIT_LETTER 'q'

// Again, in a practical program, this is a ridiculously small size
// for an array that is supposed to hold a line of text. But it's
// convenient for testing purposes.
#define LINE_ARRAY_SIZE 10

int eat_til_newline(FILE *stream);
// REQUIRES: stream is open for input.
// PROMISES: Characters are read from stream and discarded until either a
//   '\n' has been read or an input error has occurred.
//   Return value is 0 if '\n' is read, and EOF for an error.

int get_a_line(char *s, int size, FILE *stream);
// Does what fgets does, using repeated calls to fgetc, but
// provides a more useful return value than fgets does.
//
// REQUIRES
//   size > 1. 
//   s points to the start of an array of at least size bytes.
//   stream is open for input.
// PROMISES
//   Return value is EOF if input error occurred.
//   Otherwise, return value gives the index of the '\0' that
//   terminates the string in the array.

void reverse(char *s);

int main(void)
{
  char line[LINE_ARRAY_SIZE];
  int input_error = 0, len;

  while (1) {
    printf("Please enter a line of text. To quit, start it with %c.\n",
           QUIT_LETTER);

    if (NULL == get_a_line(line, LINE_ARRAY_SIZE, stdin)) { 

      input_error = 1;
      break;
    }
    if (line[0] == QUIT_LETTER)
      break;

    // Find out what fgets actually did, and react accordingly.
    len = strlen(line);
    if (line[len - 1] == '\n') { // Case 1: Yay! We read a complete line!
      line[len - 1] = '\0';      // Write '\0' over '\n'.
      printf("The line, newline removed, was \"%s\".", line);
      reverse(line);
      printf("  In reverse, that is \"%s\".\n", line);
    }
    else if (len == LINE_ARRAY_SIZE - 1) { // Case 2: Too much input.
      eat_til_newline(stdin);
      fputs("Input line ignored because it was too long!\n", stdout);
    }
    else {                   // Case 3: Error after reading one or more chars.
      input_error = 1;
      break;
    }
  } // while (1)

  fputs("\nReason for quitting: ", stdout);
  if (input_error)
    fputs("unexpected input error.\n", stdout);
  else
    printf("found %c at beginning of line.\n", QUIT_LETTER);

  return 0;
}

int eat_til_newline(FILE * stream)
{
  int c;
  do {
    c = fgetc(stream);
  } while (c != EOF && c != '\n');

  // Return EOF if c == EOF, otherwise return 0.
  return (c == EOF) ? EOF : 0;

}

int get_a_line(char *s, int size, FILE *stream)
{
  int i=0;
  do{
      if (i>=size -1)
       break;

  *(s+i)=fgetc(stream);
  i++;
  }
   while (*(s+(i-1)) !=EOF && *(s+(i-1)) !='\n');
  return * (s +(i-1));
}


void reverse(char *s)
{
  int n = strlen(s)-1;
  char c;

  for ( int i=i; i<=n/2 ; i++)
  {
    c= *(s+i);
    *(s+ i)=*(s+ n -i);
    *(s+ n -i)=c;
  }

}

10 Top Learning Management Systems APIs

Learning Management Systems (LMS) have evolved from providing student record and course material administration into offering fully enabled physical or virtual classroom tools that encompass personalized learning, performance analytics, school operations, mobile elearning, and even social and collaborative networks.

Developers wishing to create or enhance LMS applications need proper APIs to achieve their goals.

What is a Learning Management Systems API?

How to Set oEmbed Max Width in WordPress (4 Easy Methods)

Do you want to limit the width of oEmbeds in WordPress?

WordPress automatically embeds third-party content like YouTube videos, Tweets, or Facebook posts. However, sometimes the embeds may get too wide and mess up your page layouts.

In this article, we’ll show you how to set oEmbed max-width in WordPress so you can have more control over your site layout.

Setting oEmbed maximum width in WordPress

Why Fix the OEmbed Maximum Width in WordPress?

WordPress allows you to automatically embed content from select third-party websites into your posts and pages using a technology called oEmbed.

This allows you to easily embed YouTube videos, Facebook posts, tweets, and many other types of content on your website. This content is not hosted on your WordPress website. Instead, it’s displayed directly from these third-party sites.

WordPress is quite good at automatically adjusting the width of the embedded content to your website’s content or sidebar areas.

However, sometimes these embedded content may be too wide and overlap your website’s content areas, like in the example below.

A WordPress embed overflowing the content width

To fix this, you’ll need to explicitly tell WordPress to use a maximum width limit for third-party embeds. Unfortunately, there is no option in WordPress settings to do that.

That being said, let’s take a look at how to easily set oEmbed max width in WordPress without breaking anything.

We’ll cover 4 different methods, and you can choose the one that best suits your needs:

  1. Set oEmbed width with WordPress shortcode
  2. Set oEmbed width with WordPress Embed Block
  3. Set oEmbed max width with CSS
  4. Set oEmbed max width with WordPress filter (Code Method)

Method 1. Use the Embed Shortcode in WordPress

This method is easier and works really well for setting a max width for video embeds in WordPress.

Instead of pasting the URL or using the YouTube block, you’ll use the shortcode block. Inside it, you need to use the embed shortcode and include width and height parameters.

[embed width="900" height="600"]https://youtu.be/6LwWumPeues[/embed]

Feel free to change the values of the width and height to your own requirements, and replace the embed URL to your own embed.

Embed shortcode width

You can now preview your post or page and see the embed in action.

oEmbed width adjusted

The embed shortcode and its width and height parameters don’t work for all oEmbed providers. For instance, you cannot use it to set the height and width of a Giphy embed in WordPress.

In that case, you can try one of the alternative methods mentioned below.

Method 2. Use Embed Blocks in WordPress

The default WordPress editor comes with several embed blocks for different oEmbed service providers. You can use them to embed content in different areas of your posts and pages.

Embed blocks in WordPress

Some of these blocks also allow you to change the alignment of the embed and set the content width to wide or full width.

Block width and alignment

You can try using these options to see if it fixes the maximum width issue for the embed.

Method 3. Use CSS to Set Max Width for Embeds in WordPress

By default, WordPress automatically adds CSS classes to different areas of your posts and pages.

It also adds several CSS classes to embed blocks. These CSS classes can be used to set a maximum width for embeds on your WordPress website.

To find out which CSS classes you need to target, simply embed content in a post or page, and then preview it in your browser. Right-click by taking the mouse over to the embedded content and then select the Inspect tool.

Finding CSS classes for embed blocks

You’ll be able to see all the CSS classes added to the embedded element. You can use these classes to set a maximum width for this type of embed.

For instance, if you wanted to set a maximum width for all embeds, then you can use the following custom CSS.

.wp-block-embed {
    max-width: 900px!important;
}

You can also target specific oEmbed providers by using the .wp-block-embed-providername class. For instance, if you wanted to set a maximum width for only Pinterest embeds, then you can use the following custom CSS.

.wp-block-embed-pinterest {
    max-width: 900px!important;
}

Method 4. Set oEmbed Max Width Using WordPress Filter

This last method requires you to add custom code to your WordPress website. If you haven’t done this before, then take a look at our guide on how to easily add custom code snippets in WordPress.

For this method, we will add our own code into WordPress to set the default width for oEmbeds. Simply add the following code to your theme’s functions.php file or the Code Snippets plugin.

add_filter( 'embed_defaults', 'wpbeginner_embed_defaults' );
 
function wpbeginner_embed_defaults() {
    return array(
        'width'  => 400, 
        'height' => 280
    );
}

Don’t forget to adjust the height and width attributes to your own requirement.

The problem with this method is that it only applies the width attribute if the embedded content doesn’t have ‘width’ defined. If the embed code already includes width, then this method may not work.

Bonus Tip

If you regularly embed content from social media platforms to your WordPress website, then you should start using Smash Balloon.

Smash Balloon

It is the best social media plugin for WordPress and allows you to easily embed custom social media feeds in WordPress.

It supports popular social media embeds like YouTube, Twitter, and more. It also allows you to embed Facebook and Instagram content, which is not supported by WordPress.

More importantly, all social media feeds are mobile responsive and work with any WordPress theme.

We hope this article helped you learn how to set an oEmbed max width in WordPress. You may also want to see our complete social media cheat sheet or our expert comparison of the best live chat software for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Set oEmbed Max Width in WordPress (4 Easy Methods) appeared first on WPBeginner.

set autoincrement to the position (COMPETITION) after calculate totalmarks

I have a problem assigning position (number) based on the total marks. Here is the code. TQvm for your assistance
the calculation is done perfectly, the ranking is shown correctly but with no numbers, 1, 2 ,3.....
how to set autoincrement for this field (ranking) which is based on the calculation of the sum.
Tq

$sql ="SELECT idPeserta, SUM(JumlahMarkah) AS JumlahKeseluruhan, PurataMarkah,Kedudukan FROM penilaian GROUP BY idPeserta ORDER BY PurataMarkah DESC"; want to assign the rank to 'Kedudukan'

How to Draw a Mushroom

The mushroom is neither a plant nor an animal, yet it is fascinating. Mycelium, or roots, are found on the surface of the mushroom, creating the appearance of a plant. The plant matter is consumed by the mycelium, but an animal can move freely around the world. The rest of the world’s fungi, however, are...

The post How to Draw a Mushroom appeared first on .

33 Cool Things for Your Room

How nice would it be if you could come home from a long day of work to a beautiful and comfortable bedroom? Make your room pretty without being an expert interior designer! It only takes a few cool bedroom accessories to make your room pretty! I compiled this list of cool things you might want...

The post 33 Cool Things for Your Room appeared first on .

The Challenge of Economic Prioritization

The challenge of economic prioritization with WSJF.

On the surface, the foundations of job sequencing in considering the Weighted Shortest Job First (WSJF) prioritization schema seem logical. Do the smallest job with the greatest cost of delay first to deliver the greatest economic benefit. Though, in practice, it can be much more challenging. To survive and thrive in the post-digital economy, organizations need to change how they produce products, interact with customers, and define and prioritize work. To succeed in each of these areas requires a significant shift in organizational behavior, including how leaders interact with their peers.

But, how did we get here? 

Hazelcast + Kibana: Best Buddies for Exploring and Visualizing Data

A lot, if not all, of data science projects, require some data visualization front-end to display the results for humans to analyze. Python seems to boast the most potent libraries, but do not lose hope if you're a Java developer (or if you're proficient in another language as well). In this post, I will describe how you can benefit from such a data visualization front-end without writing a single line of code.

The Use Case: Changes From Wikipedia

I infer that you are already familiar with Wikipedia. If you are not, Wikipedia is an online encyclopedia curated by the community. In their own words:

SRE vs. SWE: Similarities and Differences

SRE and SWE: These acronyms are only a letter apart, and they refer to similar roles within the realm of software development and management. However, SREs and SWEs are distinct types of jobs, even if the tools and skill sets associated with them overlap to a certain degree.

What is an SRE, what is an SWE, and how are SRE and SWE roles similar and different? Keep reading to find out.

Analyzing Scans in PostgreSQL

Analysizing Scans in PostgreSQL

Introduction and Data Setup

Before we dive in, it is vital to understand the basic elementary blocks of PostgreSQL query plans. This has been covered in a separate blog post, and I highly encourage readers to go through it first.

There are several node types in PostgreSQL query plans,

Is Monolith Dead?

Monolith architecture has been very successful in shaping the software world the way we see it today. However, the last few years have seen a sharp decline in its adoption, especially with the advent of Microservices. The popularity of microservices was caused by the need for scalability and changeability which in turn is caused by the penetration of IT in almost every entity, animate or inanimate. Modern applications see no boundary when it comes to scaling and these applications are fond of change and this is where Monolith doesn’t fit at all.

Microservices, at least in theory, is “The Silver Bullet” that will solve all the problems and will serve humankind till eternity, but it doesn’t happen. Microservices bring lots of challenges that were nonexistent earlier. Still, what it does, it does it beautifully and efficiently and most importantly serves the purpose.

Dynamic Styling in Vue.js

When I started using Vue.js as a front-end framework I immediately enjoyed the easy way I can set up and manage my components. Using single file components let me focus on all aspects regarding the way I build them: I simply need to put 3 tags inside a .vue file and I can start shaping both the visual aspect and all the logic behind the component itself. Talking about styling, the first thing that the official doc tells you is how to style a component: simply insert a style tag (usually at the end of the file) and you're done. 

But when you move on and start to build complex interfaces, you immediately need to perform styling that goes beyond the simple composition of CSS classes. So, during my journey, I discovered several ways to perform dynamic styling, and this article aims to be a short reference for people that come up at first with this need.
In order to show you the different techniques, I'll use a super-simple button component that must use a specific background color value if a boolean prop is true (ok maybe is too simple, but so you'll grasp the concepts quickly).
Let's start with the component code:

You only need ONE design pattern

Let me tell you a secret; Design patterns are the natural consequences of programming idioms and paradigms that are so inferior that it's impossible to create working code without them. Design patterns are like wheel chairs, they're trying to fix that which is already broken. A piece of advice, if you can of course, try to rather avoid getting into a wheel chair in the first place (read; Use OOP that is) - Than to run to the wheel chair arguably the same way junior software developers are running to OOP these days ...

A really great programming language doesn't need design patterns in fact. This is true to the extent of that I once saw a super senior developer going through all the original 23 design patterns from the Gang of Four, and proved how 19 of them made absolutely no sense what so ever for Lisp, which we all know is a far superior programming language than any "modern" programming languages of course (duh!)

How can I pass an options value parameter to doPost?

I have a program that displays a list of vaccines and for each vaccine listed in the table, you can edit them. When I click on edit for the specified vaccine, one of the values allowed to be modified is the number of doses required, which can be changed from a drop down list. I'm having trouble being able to pass that value selected to the doPost method, as when I try changing, it goes back to the main page and shows the value for doses required as null. How can I fix this?

Here's the main vaccine list servlet:

package vaccineList.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import NewVaccine.servlet.NewVaccine;
import NewDose.servlet.NewDose;

//import cs3220.model.GuestBookEntry;
//import cs3220.utilities.*;

@WebServlet(urlPatterns = "/ListVaccine", loadOnStartup = 1)
public class ListVaccine extends HttpServlet {

    private static final long serialVersionUID = 1L;

    public ListVaccine()
    {
        super();
    }

    public void init( ServletConfig config ) throws ServletException
    {
        super.init( config );

        List<VaccineEntry> entries = new ArrayList<VaccineEntry>();
        entries.add( new VaccineEntry( "Pfizer/BioNTech", "2", "21", "10000", "10000" ) );
        entries.add( new VaccineEntry( "Johnson&Johnson", "1", "0", "5000", "5000"  ) );

        getServletContext().setAttribute( ServletFunctions.VaccineEntries, entries );
    }

    @SuppressWarnings("unchecked")
    protected void doGet( HttpServletRequest request,
        HttpServletResponse response ) throws ServletException, IOException
    {
        StringBuilder html = new StringBuilder();
        List<VaccineEntry> entries = ServletFunctions.getVaccineEntriesFromServletContext(getServletContext());

        response.setContentType( "text/html" );
        PrintWriter out = response.getWriter();

        html.append( "<p>List Vaccine</p>" );

        html.append( "<p><a href='NewVaccine'>New Vaccine</a> |" );
        html.append( "<a href='NewDose'> New Dose</a></p>" );

        html.append("<table border='1'>");

        html.append("<tr>");
        html.append( "<td>   " + " <b>Vaccine</b>   </td>" );
        html.append( "<td>" + " <b>Doses Required</b></td>" );
        html.append( "<td>" + " <b>Days Between Doses</b></td>" );
        html.append( "<td>" + " <b>Total Doses Recieved</b></td>" );
        html.append( "<td>" + " <b>Total Doses Left</b></td>" );
        html.append("<td></td>" );
        html.append( "</tr>" );

        for( VaccineEntry entry : entries )
        {

            html.append("<tr>");
            html.append( "<td>" + entry.getName() + "</td>" );
            html.append( "<td>" + entry.getDosesReq() + "</td>" );
            if(entry.getDaysBtwnDoses() == "0") {
                html.append( "<td></td>" );
            }
            else
                html.append( "<td>" + entry.getDaysBtwnDoses() + "</td>" );


            html.append( "<td>" + entry.getTotalDosesRecieved() + "</td>" );
            html.append( "<td>" + entry.getTotalDosesLeft() + "</td>" );


            html.append( "<td><a href='editVaccine?id=" + entry.getId() + "&dosesReq=" + entry.getDosesReq() + "'>Edit</a></td>"  );


            html.append( "</td>" );
            html.append( "</tr>" );
        }
        html.append( "</table>" );



        out.println( ServletFunctions.titleWithBody("ListVaccine", html.toString()) );
    }

}

and here's the edit vaccine page:

package EditVaccine.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import vaccineList.servlet.*;


@WebServlet("/editVaccine")
public class editVaccine extends HttpServlet {
    private static final long serialVersionUID = 1L;


    public editVaccine() {
        super();

    }

    @SuppressWarnings("unchecked")
    private VaccineEntry getEntry( int id )
    {
        List<VaccineEntry> entries = (List<VaccineEntry>) getServletContext()
            .getAttribute( "entries" );
        System.out.println("entry taken is " + id);


        for( VaccineEntry entry : entries )
            if( entry.getId() == id ) return entry;
        return null;
    }


    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        StringBuilder html = new StringBuilder();

        String id = request.getParameter( "id" );
        String dosesReq = request.getParameter("dosesReq");
        VaccineEntry entry = getEntry(Integer.parseInt(id));
        System.out.println("The value of id is " + id);
        System.out.println("The value of dosesReq is " + dosesReq);


        System.out.println("The value of getEntry is " + entry.getId());

        response.setContentType( "text/html" );
        PrintWriter out = response.getWriter();

        html.append("<form action='editVaccine' method='post'>" );
        html.append("<table border='1' cellpadding='2'>");
        html.append("<tr>" + "<th colspan='2'>Name</th>");
        html.append("<input type='hidden' value='" + id + "' name='id' id='id' />");
        html.append("<input type='hidden' value='" + dosesReq + "' name='dosesReq' id='dosesReq' />");
        html.append("<td><input type='text' name='name' value=" + entry.getName() + "></input></td>" + "</tr>");
        html.append("<tr><th colspan='2'>Doses Required</th>" + "<td><select id='dosesReq' name='dosesReq' " + "'>"); 
        html.append("<option value='1'" + "'>1</option>");
        html.append("<option value='2'" + "'>2</option>");
        html.append("<option value='3'" + "'>3</option>");
        html.append("</select></td>");
        html.append("<tr><th colspan='2'>Days Between Doses</th><td><input type='text' name= 'DaysBtwnDoses' value='" + entry.getDaysBtwnDoses() + "'> </input></td></tr>");
        html.append("<td colspan = '2'><button>Save</button></td>");
        html.append("</form>");
        html.append("</table>");


        out.println( ServletFunctions.titleWithBody("ListVaccine", html.toString()) );

       String[] dropDown = request.getParameterValues("dosesReq");
       System.out.println("dropdown:" + dropDown);

    }

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


        VaccineEntry entry = getEntry(Integer.parseInt(request.getParameter("id")));

        entry.setName(request.getParameter("name"));
        entry.setDosesReq(request.getParameter("dosesReq"));
        String name = entry.getName();
        System.out.println("name is " + name);
        entry.setDosesReq(request.getParameter("dosage"));
        String dosage = entry.getDosesReq();
        System.out.println("dosage is " + dosage);
        entry.setDaysBtwnDoses(request.getParameter("DaysBtwnDoses"));
        String DaysBtwnDoses = entry.getDaysBtwnDoses();
        System.out.println("DaysBtwnDoses is " + DaysBtwnDoses);

        response.sendRedirect("ListVaccine");
        return;

    }

}